Gradle: Could Not Initialize Class Org.codehaus.groovy.runtime.invokerhelper
Solution 1:
change the version of the gradle
edit the file in YOUR_PROJECT/android/gradle/wrapper/gradle-wrapper.properties
and change the version
FROM:
distributionUrl=https://services.gradle.org/distributions/gradle-6.0.1-all.zip
TO:
distributionUrl=https://services.gradle.org/distributions/gradle-6.4.1-all.zip
source: https://github.com/gradle/gradle/issues/10248#issuecomment-633656326
Solution 2:
You need to change the Gradle version of your project.
It's mentioned in the official docs: https://reactnative.dev/docs/environment-setup
"If you're using the latest version of Java Development Kit, you'll need to change the Gradle version of your project so it can recognize the JDK. You can do that by going to {project root folder}\android\gradle\wrapper\gradle-wrapper.properties and changing the distributionUrl value to upgrade the Gradle version. You can check out here the lastest releases of Gradle."
Post a Comment for "Gradle: Could Not Initialize Class Org.codehaus.groovy.runtime.invokerhelper"