Error:execution Failed For Task ':app:transformclasseswithdexforrelease' - Android Studio
I have successfully created an android application using android studio, and works fine when i run into android emulator or device connected to the development machine, but when i
Solution 1:
Edit:
Please check you having this two libraries common :
compile'com.yalantis:ucrop:2.2.0'compile'com.yalantis:ucrop:2.2.0-native'
remove one of them and check which one is needed for you.
Check this answer for multidex issue.that one helped me to fix that issue.
It seems your logcat clearly shows annotations identifier DexException: Multiple dex files define Lorg/intellij/lang/annotations/Identifier
. You should remove this line support -annotations:
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
Moreover, If you are using google play services bundle like this : compile 'com.google.android.gms:play-services:8.1.0
change into below gms separately for all libraries
compile 'com.google.android.gms:play-services-location:8.1.0'
compile 'com.google.android.gms:play-services-base:8.1.0'
compile 'com.google.android.gms:play-services-analytics:8.1.0'
compile 'com.google.android.gms:play-services-maps:8.1.0'
compile "com.google.android.gms:play-services-gcm:8.1.0' //
for gcm push notification
Solution 2:
Try enabling multidex . inside app level build.gradle write these lines
android {
...
defaultConfig {
...
// Enabling multidex support.
multiDexEnabled true
...
}
...
}
dependencies {
...
compile 'com.android.support:multidex:1.0.1'
...
}
check this for more info
Post a Comment for "Error:execution Failed For Task ':app:transformclasseswithdexforrelease' - Android Studio"