-
Notifications
You must be signed in to change notification settings - Fork 969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot resolve method 'plant(timber.log.Timber.DebugTree)' #459
Comments
If anybody could try to reproduce it in Intellij IDEA, that might me helpful. The issue may be neither in Timber nor in AS, but in Kotlin plugin, and in that case should be reported to JetBrains. |
Are you calling from a Java or Kotlin source file? |
This only happens when calling from Java. |
This issue has also been discussed here. @gmk57 has mentioned a ticket in the Android Studio bugtracker. The Google engineer noted that it could be an issue that Probably also related to this bug in the kotlin plugin Maybe this helps to find the cause of this issue? |
Let's be clear that this is just false positive highlighting in IDEA, code compiles fine. Title/comments of this issue make it look like a more severe problem. It is not specific to Timber, it manifests with many other Kotlin-first libraries consumed in Java code. The issue is related to IDEA Kotlin plugin: Currently in backlog for next IDEA release 2022.2. |
Same problem, but we can wrap the initialization code with a Kotlin class. |
So recently this issue had been marked as fixed, stating that compiling libraries with Kotlin compiler 1.8 resolves this (properly writes InnerClasses attribute, details in recent issue comments). It is discussed whether Idea may get a workaround for highlighting of libraries compiled with earlier versions. Again, to reiterate, this only concerns usage of Kotlin libraries in Java code, and is not Timber-specific issue. So I think this issue can be closed. |
For workaround solution to avoid annoying warning message every time we stay on our Java class and to avoid the class appear in red color as it might confused with the error, I think you can try with my answer here: https://stackoverflow.com/a/75388643/7257373 |
still would be awesome for timber to fix the issue - as stated in the google issue tracker, it needs compiled with a newer compiler to fix the issue. IntelliJ is hardly going to work around it themeselves. |
com.jakewharton.timber:timber:5.0.1
Reproduction steps:
Cannot resolve method 'plant(timber.log.Timber.DebugTree)'
Lint error message:Additional notes:
5.0.0
versions of Timber.5.0.0
versions of Timber as mentioned previously.The text was updated successfully, but these errors were encountered: