Android Studio Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

We Are Going To Discuss About Android Studio Could not initialize class org.codehaus.groovy.runtime.InvokerHelper. So lets Start this Java Article.

Android Studio Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

  1. Android Studio Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

    This is because of the gradle version.
    Go to: gradle/wrapper/gradle-wrapper.properties.
    Change a version of the course by this:
    distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip

  2. Android Studio Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

    This is because of the gradle version.
    Go to: gradle/wrapper/gradle-wrapper.properties.
    Change a version of the course by this:
    distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip

Solution 1

Please make changes as per below to resolve this error.

Install Java SDK version: 14 or above.

JDK Download link: https://www.oracle.com/java/technologies/javase-jdk14-downloads.html

In gradle-wrapper.properties please use grade version 6.3 or above.

For e.g:distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip

Advertisements

Original Author Patel Pinkal Of This Content

Solution 2

  1. This is because of the gradle version.

  2. Go to: gradle/wrapper/gradle-wrapper.properties.

  3. Change a version of the course by this:

distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip

The console outputs:

Welcome to Gradle 6.3!

Here are the highlights of this release:
 - Java 14 support
 - Improved error messages for unexpected failures

For more details see https://docs.gradle.org/6.3/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
Advertisements

Original Author Josileudo Rodrigues Of This Content

Solution 3

First watch this and try reinstall – https://youtu.be/trHinrIm6DM

After if you get “Could not initialize class org.codehaus.groovy.runtime.InvokerHelper”

1.install Java SDK 14 and update env path.

2.”[Your RN or Flutter Project Folder]\android\gradle\wrapper\gradle-wrapper.properties” this file edit as …(upgrade gradle version)

#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip

3.run gradlew in cmd path “[Your RN or Flutter Project Folder]\android\”

4.it takes time.after if shows “BUILD SUCCESSFUL” you can “flutter run” in ur project folder

Yeah It’s work 👍

Advertisements

Original Author ThamaBoy Of This Content

Solution 4

What was helpful for me (MacBook):

  • first go to File -> Invalidate Caches / Restart -> Invalidate and Restart
  • then check the value of JAVA_HOME enviroment variable, by calling echo $JAVA_HOME (it should be equal to “/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home”)
  • if it is not, change its value by calling export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"
Advertisements

Original Author jakub-adamczewski Of This Content

Conclusion

Advertisements

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment