developer1011 developer1011 - 2 months ago 24x
Android Question

Error:...while parsing LambdaConverter.class Error:1 error; aborting Error:Execution failed for task ':app:transformClassesWithDexForDebug'

Getting this build error in Android Studio. Did anybody face this kind of error? How to resolve this?

Error:unsupported class file version 52.0
Error:...while parsing com/thoughtworks/xstream/converters/reflection/LambdaConverter.class
Error:1 error; aborting
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1


After removing this from build.gradle the issue is resolved
compile 'com.thoughtworks.xstream:xstream:1.4.9'

Issue occurs when number of methods count exceeds a certain limit defined in Dalvic

Solving this problem with multiDexEnabled leads to more problems. // Enabling multidex support. multiDexEnabled true

Cleaner way is to resolve the problem and not use multidex option.

For more options please refer to link