Skip to content
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

DexException - Multiple dex files define Lokio/Sink #150

Closed
rochapablo opened this issue Dec 29, 2017 · 2 comments
Closed

DexException - Multiple dex files define Lokio/Sink #150

rochapablo opened this issue Dec 29, 2017 · 2 comments

Comments

@rochapablo
Copy link

rochapablo commented Dec 29, 2017

I can work normally running locally but when I try to build my production APK I got:

Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lokio/Sink;
Error:Execution failed for task ':app:transformDexWithDexForRelease'.
> com.android.build.api.transform.TransformException: 
com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: 
com.android.ide.common.process.ProcessException: Error while executing java process with main 
class com.android.dx.command.Main with arguments {--dex --num-threads=4 --output
build/intermediates/transforms/dex/release/0 --min-sdk-version 16 
build/intermediates/transforms/preDex/release/59.jar 
build/intermediates/transforms/preDex/release/16.jar 
build/intermediates/transforms/preDex/release/41.jar 
build/intermediates/transforms/preDex/release/68.jar 
build/intermediates/transforms/preDex/release/7.jar 
build/intermediates/transforms/preDex/release/25.jar 
build/intermediates/transforms/preDex/release/8.jar 
build/intermediates/transforms/preDex/release/15.jar 
build/intermediates/transforms/preDex/release/42.jar 
build/intermediates/transforms/preDex/release/67.jar 
build/intermediates/transforms/preDex/release/50.jar 
build/intermediates/transforms/preDex/release/24.jar 
build/intermediates/transforms/preDex/release/9.jar 
build/intermediates/transforms/preDex/release/14.jar 
build/intermediates/transforms/preDex/release/30.jar 
build/intermediates/transforms/preDex/release/43.jar 
build/intermediates/transforms/preDex/release/60.jar 
build/intermediates/transforms/preDex/release/39.jar 
build/intermediates/transforms/preDex/release/3.jar 
build/intermediates/transforms/preDex/release/69.jar 
build/intermediates/transforms/preDex/release/26.jar 
build/intermediates/transforms/preDex/release/31.jar 
build/intermediates/transforms/preDex/release/44.jar 
build/intermediates/transforms/preDex/release/13.jar 
build/intermediates/transforms/preDex/release/61.jar 
build/intermediates/transforms/preDex/release/2.jar 
build/intermediates/transforms/preDex/release/46.jar 
build/intermediates/transforms/preDex/release/11.jar 
build/intermediates/transforms/preDex/release/29.jar 
build/intermediates/transforms/preDex/release/12.jar 
build/intermediates/transforms/preDex/release/62.jar 
build/intermediates/transforms/preDex/release/1.jar 
build/intermediates/transforms/preDex/release/38.jar 
build/intermediates/transforms/preDex/release/64.jar 
build/intermediates/transforms/preDex/release/28.jar 
build/intermediates/transforms/preDex/release/45.jar 
build/intermediates/transforms/preDex/release/0.jar 
build/intermediates/transforms/preDex/release/20.jar 
build/intermediates/transforms/preDex/release/63.jar 
build/intermediates/transforms/preDex/release/65.jar 
build/intermediates/transforms/preDex/release/52.jar 
build/intermediates/transforms/preDex/release/51.jar 
build/intermediates/transforms/preDex/release/5.jar 
build/intermediates/transforms/preDex/release/19.jar 
build/intermediates/transforms/preDex/release/49.jar 
build/intermediates/transforms/preDex/release/21.jar 
build/intermediates/transforms/preDex/release/36.jar 
build/intermediates/transforms/preDex/release/23.jar 
build/intermediates/transforms/preDex/release/10.jar 
build/intermediates/transforms/preDex/release/53.jar 
build/intermediates/transforms/preDex/release/40.jar 
build/intermediates/transforms/preDex/release/17.jar 
build/intermediates/transforms/preDex/release/66.jar 
build/intermediates/transforms/preDex/release/6.jar 
build/intermediates/transforms/preDex/release/18.jar 
build/intermediates/transforms/preDex/release/22.jar 
build/intermediates/transforms/preDex/release/35.jar 
build/intermediates/transforms/preDex/release/48.jar}
"react-native": "^0.48.4"
"react-native-splash-screen": "^3.0.6"

I've tried those, but still not working.

compile (project(':react-native-splash-screen')) {
        // this is a case for duplicate support library version.
        exclude group: 'com.android.support'
        exclude group: 'com.facebook.react'
}
@rochapablo
Copy link
Author

Worked! I had just to add module, just like this:

compile (project(':react-native-splash-screen')) {
        exclude group: 'com.android.support', module: 'appcompat-v7'
}

@budiga
Copy link

budiga commented Mar 7, 2018

This worked for me,add this to my build.gradle:
android {
dexOptions {
preDexLibraries = false
}
}
stackOverflow link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants