Timber 4.7.1 appears to require JDK 1.8
See original GitHub issueWe have a project that is currently not compatible with JDK 1.8. When updating from version 4.7.0 to 4.7.1 we get the following error:
Error:Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
This appears to be related to the version bump for the Jetbrains annotations (https://github.com/JakeWharton/timber/commit/28aa40af827686bb5d4b8c481d582e9e3a04a7f9#diff-c197962302397baf3a4cc36463dce5eaL29). The docs for the annotations starting with version 16.0.1 mention they require JDK 1.8:
annotations
artifact require JDK 1.8 or higher. If your project is compiled using JDK 1.5, 1.6 or 1.7 you can useannotations-java5
artifact instead.
This is first mentioned at https://github.com/JetBrains/java-annotations/commit/fda1bd27cac5b7964d64a5a2586a853460d301c2#diff-04c6e90faac2675aa89e2176d2eec7d8 .
Is JDK 1.8 meant to be an intentional dependency for Timber 4.7.1 and up?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
I don’t think I’m going to “fix” this. With AS / AGP 3.2 desugar has moved into D8 and should just work. With AS / AGP 3.1 you can enable it by setting
android.enableD8.desugaring=true
ingradle.properties
. The Android toolchain is long overdue in making Java 8 the default, and with 3.2 becoming stable it’s finally time where libraries don’t have to worry about it anymore.OK, seems fair. Thanks for checking! I’ll close this out.