I'm facing a problem when building project having multiDexEnabled is true in build.gradle
here is the error
**Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
java.io.IOException: Can't read [APP_PATH/app/build/intermediates/transforms/CLASSES/FULL_PROJECT/jarMerging/debug/classes.jar] (Can't process class [i.class] (Unknown verification type [19] in stack map frame))**
here is the my gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
useLibrary 'org.apache.http.legacy'
defaultConfig {
multiDexEnabled true
applicationId "com.example.application"
minSdkVersion 11
targetSdkVersion 23
versionCode 13
versionName "2.4"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.squareup:android-times-square:1.6.4@aar'
compile files('libs/IDTUniPaySDK.jar')
compile files('libs/emv-bertlv-0.1.3-shaded.jar')
compile files('libs/audio.jar')
compile files('libs/bluebambooV4.4.jar')
compile 'ch.acra:acra:4.6.2'
compile 'com.google.code.ksoap2-android:ksoap2-android:3.4.0'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
}
when i removed these two dependencies(1-compile files('libs/audio.jar') 2-compile files('libs/bluebambooV4.4.jar')) and also removed the reference code that used these 2 dependencies , my project works fine.
This is what i did to fix this issue:
Go to File > project structure and - in section Modules, check for each module, if the Build tool version in Properties is equivalent to the Target Sdk version in Flavors.
Screenshot of the solution log of my error:
Error:Execution failed for task ':app:transformClassesWithDexForRelease'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex --num-threads=4 --multi-dex --main-dex-list ..\app\build\intermediates\multi-dex\release\maindexlist.txt --output ..\app\build\intermediates\transforms\dex\release\folders\1000\1f\main ..\app\build\intermediates\transforms\jarMerging\release\jars\1\1f\combined.jar}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With