question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timber 4.7.1 appears to require JDK 1.8

See original GitHub issue

We 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 use annotations-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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
JakeWhartoncommented, Sep 5, 2018

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 in gradle.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.

0reactions
byenchocommented, Sep 6, 2018

OK, seems fair. Thanks for checking! I’ll close this out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Known Issues for JDK 8 - Oracle
This document describes known issues in the Oracle JDK 8 release.
Read more >
Oracle JDK 8 and JRE 8 Certified System Configurations
Support for SPARC M8 and SPARC T8 requires JDK 1.8.0_131 or higher. Oracle Linux covers both kernels: Red Hat Compatible and Unbreakable. On...
Read more >
Java Downloads | Oracle
Java 17 LTS is the latest long-term support release for the Java SE platform. JDK 19 and JDK 17 binaries are free to...
Read more >
Java SE 8 Archive Downloads (JDK 8u202 and earlier) - Oracle
Java Archive Downloads - Java SE 8. ... Downloading these releases requires an oracle.com account. ... Windows x86 Online, 1.8 MB.
Read more >
9 Installation of the JDK and the JRE on Microsoft Windows ...
Public Java Runtime Environment. When you install 64-bit JDK, then 64-bit public JRE also gets installed. The following table provides the disk requirements...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found