If I run gradle assembleDebug
from the command line, I am suddenly getting this error:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.util.DexEx
I had the same problem when adding react-native-palette
to my project, here is my dependencies tree:
./gradlew app:dependencies
+--- project :react-native-palette
| +--- com.facebook.react:react-native:0.20.+ -> 0.44.2
| | +--- javax.inject:javax.inject:1
| | +--- com.android.support:appcompat-v7:23.0.1
| | | \--- com.android.support:support-v4:23.0.1
| | | \--- com.android.support:support-annotations:23.0.1 -> 24.2.1
...
| \--- com.android.support:palette-v7:24.+ -> 24.2.1
| +--- com.android.support:support-compat:24.2.1
| | \--- com.android.support:support-annotations:24.2.1
| \--- com.android.support:support-core-utils:24.2.1
| \--- com.android.support:support-compat:24.2.1 (*)
+--- com.android.support:appcompat-v7:23.0.1 (*)
\--- com.facebook.react:react-native:+ -> 0.44.2 (*)
I tried many solutons and could not fix it, until changing the com.android.support:appcompat
version in android/app/build.gradle
, I wish this can help:
dependencies {
compile project(':react-native-palette')
compile project(':react-native-image-picker')
compile project(':react-native-camera')
compile fileTree(dir: "libs", include: ["*.jar"])
// compile "com.android.support:appcompat-v7:23.0.1"
compile "com.android.support:appcompat-v7:24.2.1"
compile "com.facebook.react:react-native:+"
}
it seems that multiple entries is not a big problem, version mismatch is