Canntot debug any more

Hi there !
i did update some days ago to AS 3.4.1, did not change the dependancy to android gradle (3.3.2) and use gradle 4.10.3. i do use the 1.4.4-C plugin .

But trying to debug an moe appl., i get a retrolamba error:

Retrolambda 2.0.2-SNAPSHOT
Bytecode version: 51 (Java 7)
Default methods: true
NatJ support: true
Input directory: …
Output directory:…
Classpath: … 1.4.2/tools/java8support.jar:/ … /.moe/moe-sdk-1.4.2/sdk/moe-core.jar
Error! Failed to transform some classes
java.lang.IllegalStateException: Cannot initialize dumper; unexpected JDK implementation. Please run Retrolambda using the Java agent (enable forking in the Maven plugin).
at net.orfjackal.retrolambda.lambdas.LambdaClassDumper.install(
at net.orfjackal.retrolambda.Main.main(
Caused by: java.lang.NoSuchFieldException: modifiers
at java.base/java.lang.Class.getDeclaredField(
at net.orfjackal.retrolambda.lambdas.LambdaClassDumper.makeNonFinal(
at net.orfjackal.retrolambda.lambdas.LambdaClassDumper.install(
… 2 more

When i execute the gradle task in my terminal window, i can execure the retrolambda task !

Does anyone have a suggestion/solution for my problem?
regards, Yarnee

I want to push this issue, since it now got me too on MacOS and I don’t know how to fix it :frowning:

For those who also still struggle at this issue:

I found the solution to this. The thing that confused me in the first place is, that you can actually select the JDK version gradle is using in your project settings. Well this indeed does cause the project to be rebuilt and first it also seems that gradle will just use the selected JDK but during the build, gradle is probably selecting another JDK version which is available.

For me I had JDK 8, 9 or 11 selected but it didn’t work, since I also had version 14 installed on the MAC. Once I removed JDK 14 from the Library it worked perfectly.

Hello Christian & thanks for the reply.
It is a workaround actually and not a solution, to be forced to delete an installation of a JDK.
Did u find out, how to set the JDK version used by Gradle to build?
Best regards, Yarnee

ps.: i also somehow did solve the problem, creating always a new project and moving the source into it. But also a workaround, not a asolution as i already mentioned. i will look forward to have a solution.

1 Like

Have you tried to set the jdk that android studio uses by:
File -> Project Structure -> SDK Location
then select JDK 1.8 in the JDK location field.

Update THIS:

Important: This is not module settings that you can open by right click the project

1 Like