:App:Dexdebug Execexception Finished with Non-Zero Exit Value 2

:app:dexDebug ExecException finished with non-zero exit value 2

After days of trying out finally could fix the issue. The problem with one of my .jar files. I had to remove each jar and check one by one until i found it. I removed the .jar file and cleaned my project and ran successfully. If any one should face similar issue check your jar file one by one.

app:dexDebug ExecException finished with non-zero exit value 2

Turn on ProGuard because it's too many process (over 65K). See enter link description here

Java finished with non-zero exit value 2 - Android Gradle

I didn't know (by then) that "compile fileTree(dir: 'libs', include: ['*.jar'])" compile all that has jar extension on libs folder, so i just comment (or delete) this lines:

//compile 'com.squareup.retrofit:retrofit:1.9.0'
//compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
//compile 'com.squareup.okhttp:okhttp:2.2.0'

//compile files('libs/spotify-web-api-android-master-0.1.0.jar')
//compile files('libs/okio-1.3.0.jar')

and it works fine. Thanks anyway! My bad.

Android Studio-Java.exe is finished with non-zero exit value 2

This happened for me when I was refactoring some class files to a library project and I had a duplicate name of a class file. So, double check that you do not have any duplicate names. This also appears to be a duplicate of the question here: android project: process finished with non-zero exit value 2

Android Studio multiple jar finished with non-zero exit value 2 error

I solved it by moving my brand new module to the linkedInSDK and enabling multiDex. So I saw I had two problems, the first one is my project is over 65k Methods which needs multiDex, and library conflict between linkedInSDK and the new SDK.

So here is my linkedInSDK\build.gradle:

dependencies {
compile files('libs/volley.jar')
compile 'com.android.support:support-v4:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0'
//compile 'com.mcxiaoke.volley:library:1.0.17'
compile(name: 'app-debug', ext: 'aar')

}

repositories {
flatDir {
dirs 'libs'
}
}

So the volley library is used in the same module without conflict. Yay!



Related Topics



Leave a reply



Submit