-
Notifications
You must be signed in to change notification settings - Fork 967
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
Still new Timber.DebugTree()
cannot be coded in Java
#484
Comments
Is this library even updated anymore? |
|
This shit is not Java. |
If you have a mixed kotlin and java project, you could write a kotlin function to plant the trees. Call Timber#plant from your kotlin code, and call you own kotlin plant function from your java code |
same to me, i use in react-native android project. |
For anyone who found other dependencies that use Timber 5.0+ (like https://github.com/maplibre/maplibre-native and https://github.com/maplibre/maplibre-plugins-android), you can exclude them in the gradle file (Kotlin DSL) of your app's module like this: implementation(...) {
exclude(group = "com.jakewharton.timber", module = "timber")
} If not excluded, the code still compiles but your IDE will show this error as it won't know which one to use, so it goes with the later one instead. See the tips in https://github.com/AndroidKnife/RxBus#usage for the old gradle DSL usage. |
暂时使用反射来避免红线错误 |
try this guys Timber.plant(Timber.asTree()); |
this_is_fine.jpg // noinspection DataFlowIssue
Timber.plant((Timber.Tree) (Object) new Timber.DebugTree()); |
This issue occurs since 5.0.0.
No fixing in 5.0.1.
For Java version, we have to use 4.7.1.
#458 #459
https://stackoverflow.com/questions/70870740/cannot-resolve-method-planttimber-log-timber-debugtree
If this is unsolvable, please add remarks in
README.me
for new users to use it with Java code.The text was updated successfully, but these errors were encountered: