Reputation: 861
To start off, this is the whole message:
Error:Error converting bytecode to dex: Cause: java.lang.RuntimeException: Exception parsing classes
Error:1 error; aborting
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_51\bin\java.exe'' finished with non-zero exit value 1
This is what I have tried: Restarting AS. Restaring my computer. Tried invaldiate caches and restart. Rebuilt the project serveral times.
Earlier today I installed that latest java update, but it did not affect anything. After a couple of hours of coding, I added a jar file to my libs folder and wrote a class that used some of the classes from that library.
Now I can't seem to build the application at all anymore, even if comment out the class that uses the dependency.
Using Android Studio 2.0, Java 1.8.0_91-b14 and the library mysql-connector-java-5.1.38-bin
Edit: I just tried removing the jar file, and now it builds just fine. So that's the thing causing the problem. Now how to solve it...
Upvotes: 1
Views: 10018
Reputation: 69
I think you need to add the following line in your app's build.grade file
defaultConfig {
...
multiDexEnabled true
}
Upvotes: 1