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.

Multi-version jar file problem with Android SDK

See original GitHub issue

UPDATE (from @elizarov): JEP 238 multi-version jars seem to be causing various issue with google toolchain. Reported thus far:

  • MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)
  • Program type already present: kotlinx.coroutines.experimental.InvokeOnCancellation, Program type already present: kotlinx.coroutines.experimental.internal.LockFreeMPMCQueueNode, etc
  • class name (kotlinx/coroutines/experimental/scheduling/LimitingDispatcher) does not match path (META-INF/versions/9/kotlinx/coroutines/experimental/scheduling/LimitingDispatcher.class), etc

ORIGINAL REPORT:

Trying to compile an Android project with min SDK 19 and the newly released 0.25.0 I suddenly receive the following build error:

MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)

Android Studio: 3.1.4 Android Gradle Plugin: 3.1.4

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:25
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

13reactions
qwwdfsadcommented, Aug 30, 2018

We’re going to revert multirelease JAR

4reactions
cbrueggcommented, Aug 30, 2018

Indeed the complete switch to multi-version JARs seems a bit premature. Especially when multiple developers are working on a project, it’s not easy to switch to alpha-level build components.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jar Mismatch Found 2 versions of android-support-v4.jar in ...
When I build my project, I get a jar mismatch problem having duplicate references to two copies of the same file.
Read more >
Multi-release JARs - Good or bad idea?
Multi-release jars are only the wrong (default) packaging: they should be an option, not a goal. Technically, the source layout is the same...
Read more >
[JDK-8047305] JEP 238: Multi-Release JAR Files
Implement multi-release JAR files in the JRE, including support in the standard class loaders and JarFile API. Enhance other critical tools ( ...
Read more >
Multi-Release Jar Files
The solution in Java 9 is to leave the original class untouched and instead create a new version using the new JDK and...
Read more >
Known issues with Android Studio and Android Gradle Plugin
To fix this issue, upgrade your Android 11 emulator to version 9 or higher by navigating to Tools > SDK Manager. In the...
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