Intellij 2019.1 Gradle Unable to find method 'java.lang.invoke.MethodHandles$Lookup.defineClass([B)Ljava/lang/Class;'.

Answered

After upgrading intellij from 2018.6 to 2019.1 my gradle projecte fails to sync in the IDE. It works fine with intellij 2018

I'm getting following message:

"Unable to find method 'java.lang.invoke.MethodHandles$Lookup.defineClass([B)Ljava/lang/Class;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes."

 

gradle project works fine from command line.

I'm using 5.2.1 gradle wrapper:

------------------------------------------------------------
Gradle 5.2.1
------------------------------------------------------------

Kotlin DSL: 1.1.3
Kotlin: 1.3.20
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_51 (Oracle Corporation 25.51-b03)
OS: Mac OS X 10.14.3 x86_64

 

Is it a known issue

 

 

0
4 comments

What Gradle plugins do you use in project? Please also provide the information from "About" dialog.

Is project available to check (you can upload it to our server ftp://ftp.intellij.net/.uploads / https://uploads.services.jetbrains.com that has restricted access)?

Try also using more recent Gradle plugin versions and with different Gradle version in IDE settings.

If issue remains also attach full error text and idea.log file.

0
Avatar
Permanently deleted user

1/ About dialog information:

IntelliJ IDEA 2019.1 (Ultimate Edition)
Build #IU-191.6183.87, built on March 27, 2019

JRE: 1.8.0_202-release-1483-b39 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.3

2/ Used plugins:

plugins {
`java-library`
maven
`maven-publish`
}

3/ I'm using gradlew in IDE settings

4/ Uploaded idea-logs-20190411-080153.zip to https://uploads.services.jetbrains.com/

 

0

Try using 1.8 JDK to run Gradle (Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Gradle | Gradle JVM).

Or try using IntelliJ IDEA that runs under 11JDK: https://www.jetbrains.com/idea/download

1
Avatar
Permanently deleted user

Changing JDK to 1.8 in IntelliJ Settings (as you described above) fixed the problem. 

Thanks

0

Please sign in to leave a comment.