I am migrating my Android code from Eclipse to Android studio and have been stuck at the following error. The project builds fine and syncs with gradle, but it throws the fo
In Android build fails over com.android.dex.DexException: Multiple dex files define Landroid/support
Solved with exclude
as
dependencies {
compile fileTree(dir: 'libs', include: '*.jar', exclude: 'android-support-*.jar')
//...
}
and
At Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat it easy as exclude module: 'support-v4'
example
dependencies {
compile('com.commonsware.cwac:camera-v9:0.5.4') {
exclude module: 'support-v4'
}
compile 'com.android.support:support-v4:18.0.+'
}
(also posted to Gradle Exclude or add reference for JAR file hard included inside library classes.jar)