martincik/react-native-hockeyapp

Multiple dex files define Landroid/support/v7/appcompat/R$anim;

peterpme opened this issue · 7 comments

Hey, thanks for making this library great!

I'm having a few issues on Android:

  • React Native 0.27
  • Android 5X 6.0.1

I went through the process manually, I did not use rnpm link

Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexException: Multiple dex files define Landroid/support/v7/appcompat/R$anim;
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)

:app:dexDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

Try this command at the root of your project:

cd android && ./gradlew clean

It worked when I got this error.

@peterpme Did the gradlew clean command worked for you?

Hey, what ended up happening is the multiple versions of GCM so I forced a particular version! Thanks!

Thanks @jmitch0901, saved me a lot of heartache.

@jmitch0901 THANK YOU! I've been searching FOR HOURS for a resolution, and it was as simple as cleaning the project 😄

@jmitch0901 wish I could upvote your answer 1000 times.

@jmitch0901 OMG!!!! THX!!