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.

Failed on android with com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzpq;

See original GitHub issue

On Android gradles build process gives the following exception:

Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzpq;
Unknown source file :   at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
Unknown source file :   at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
Unknown source file :   at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
Unknown source file :   at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
Unknown source file :   at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
Unknown source file :   at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
Unknown source file :   at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
Unknown source file :   at com.android.dx.command.dexer.Main.run(Main.java:277)
Unknown source file :   at com.android.dx.command.dexer.Main.main(Main.java:245)
Unknown source file :   at com.android.dx.command.Main.main(Main.java:106)

When removing react-native-device-info-stuff from build.gradle, settings.gradle and MainActivity.java, everything works fine.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

14reactions
Sebastien-Lampazonacommented, Jan 27, 2017

Resolve with that in android/app/build.gradle :

compile (project(':react-native-device-info')){
       exclude group: "com.google.android.gms" 
}
7reactions
Nodoniskocommented, Mar 1, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

com.android.dex.DexException: Multiple dex files define
Opened project from a friend who is using 0.3.2. Tried to compile but got exception. Execution failed for task ':JuiceTV:dexDebug'. > com.android ......
Read more >
Multiple dex files define Lcom/google/android/gms/internal ...
I got this error after linking the library with the Android project Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION: Unknown source ...
Read more >
Error Unable to execute dex Multiple dex files define - Edureka
Unable to execute dex: Multiple dex files define Landroid/support/v4/app/ActivityCompatHoneycomb;. I've seen this error since updating to ADT 15 ...
Read more >
Multiple dex files define Lorg/apache/cordova/PermissionHelper
When trying to build Android I receive the following error: com.android.dex.DexException: Multiple dex files define ...
Read more >
Multiple dex files define Lcom/google/unity/BuildConfig
Hi! I'm struggling to create a Unity build for Android (I'm new to Android as a platform). I get this error: ``` Execution...
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