blackchestnut / blackchestnut.github.io

Developer notes about Ruby on Rails, React Native, PostgreSQL, etc.
https://kalinichev.net
4 stars 0 forks source link

Execution failed for task ':app:dexDebug'. #13

Open blackchestnut opened 7 years ago

blackchestnut commented 7 years ago
$ react-native run-android
...
: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_60.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

or

:app:dexDebug FAILED

FAILURE: Build failed with an exception.

Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexException: Multiple dex files define Landroid/support/v7/appcompat/R$anim;
...

Solution

$ cd android && ./gradlew clean