Multi-version jar file problem with Android SDK
See original GitHub issueUPDATE (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
, etcclass 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:
- Created 5 years ago
- Reactions:25
- Comments:18 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’re going to revert multirelease JAR
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.