I\'m unable to compile my android project. Google and other SO posts tell me it (probably) has something to do with dependencies, but I can\'t find where. Here\'s the error:
I have used this command in build.gradle file.
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
It has resolved this "non-zero-exit-value" and another one 'duplicate entry during packageAllDebugClassesForMultiDex'.
In my case I write in the build.gradle
dependencies from the parse quick guide
dependencies{
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
}
then I replace with
dependencies {
compile 'com.parse.bolts:bolts-android:1.+'
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
}
Save the changes, restart the android studio and run the project. It worked in my case.
Android Studio suggests,
Avoid using + in version numbers can lead to unpredictable and unrepeatable builds.
+ in dependencies lets you pick up automatically the latest available version rather than a specific one, however this is not recommended.
You may have tested with a slightly different version than what build server used.
After Removing Plus Sign and Adding a Specific Version problem was solved in my case.
The date of when this happened to me was 07/08/2016.
I just got this exact error after updating to the newest android studio.
I resolved it by updating my java jdk from java jdk 7 to java jdk 8.
Now my builds work fine. I think the newest version of android studio requires jdk 8…
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.