unittester
unittester

Reputation: 1

JUNIT instrumentation test failing in android studio

AGPBI: {"kind":"error","text":"indicate that it is not an inner class.","sources":[{}]} AGPBI: {"kind":"error","text":"PARSE ERROR:","sources":[{}]} AGPBI: {"kind":"error","text":"unsupported class file version 52.0","sources":[{}]} AGPBI: {"kind":"error","text":"...while parsing com/thoughtworks/xstream/converters/reflection/LambdaConverter.class","sources":[{}]} AGPBI: {"kind":"error","text":"1 error; aborting","sources":[{}]}

:app:transformClassesWithDexForDebug FAILED

FAILURE: Build failed with an exception.

Added to gradle file : testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" multiDexEnabled true But didnt help. What am I missing?

Upvotes: 0

Views: 370

Answers (1)

jdonmoyer
jdonmoyer

Reputation: 1270

Android doesn't support the Java 8 (version 52.0) class file format (and only supports some Java 8 language level features if you are using the 3.0.0-alpha or later android gradle plugin). If you control the module/jar that contains com.thoughtworks.xstream.converters.reflection.LambdaConverter.class, you can recompile it targeting java 7 in order to remove this error.

Upvotes: 1

Related Questions