-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Multi-version jar file problem with Android SDK #510
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
Comments
You need to exclude classes that are inside of |
Can you please tell me how to exclude these classes? I've tried different solutions but nothing seems to work: android {
sourceSets.main.java.filter.exclude 'META-INF/**/*'
packagingOptions {
exclude 'META-INF/**/*'
}
} |
Example applications for Android that are included in
Please, confirm that it helps with other applications, too. |
Is there a workaround for this issue without using alpha-stability components? Not even Grade plugin |
@elizarov I got that error using AGP |
@SUPERCILEX It seems that you need R8 to be enabled un your |
@elizarov Ohhhhh, I enabled R8 a few commits later. I'll try and report back. |
@matejdro We don't have another workaround at the moment, but to update to the latest alpha version of toolchain. You should be able just to filter all the classes from |
@elizarov Nope, it still fails with R8 enabled: |
In my case it was 0.25.0 coroutines. 0.24.0 -- is OK. |
I'm with this problem too. Using coroutines 0.25.0, AGP 3.3.0-alpha05 and gradle 4.9 |
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. |
We're going to revert multirelease JAR |
So someone know how to fix it ? |
@Mracobes9 revert to 0.24.0 |
@ezamelczyk . revert what ? Coroutines ? |
* Distribution no longer uses multi-version jar (unsuppored on Android) * JS version of the library does not deneds on AtomicFu: All the atomic boxes in JS are fully erased. Fixes #510
Use |
* Distribution no longer uses multi-version jar (unsuppored on Android) * JS version of the library does not deneds on AtomicFu: All the atomic boxes in JS are fully erased. Fixes #510
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
, etcclass name (kotlinx/coroutines/experimental/scheduling/LimitingDispatcher) does not match path (META-INF/versions/9/kotlinx/coroutines/experimental/scheduling/LimitingDispatcher.class)
, etcORIGINAL 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:
Android Studio: 3.1.4
Android Gradle Plugin: 3.1.4
The text was updated successfully, but these errors were encountered: