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

后端 未结 16 1298
一整个雨季
一整个雨季 2020-12-02 11:29

I am new in Android Studio. After setup, When I am trying to import an application I am getting that error So that gradle not able to build.

Error:Could not

16条回答
  •  無奈伤痛
    2020-12-02 12:27

    I face this issue when I was Building my Flutter Application. This error is due to the gradle version that you are using in your Android Project. Follow the below steps:

    • Install jdk version 14.0.2 from https://www.oracle.com/java/technologies/javase-jdk14-downloads.html .

    • If using Windows open C:\Program Files\Java\jdk-14.0.2\bin , Copy the Path and now update the path ( Reffer to this article for updating the path : https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/ .

    • Open the Project that you are working on [Your Project]\android\gradle\wrapper\gradle-wrapper.properties and now Replace the distributionUrl with the below line:

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

    Now Save the File (Ctrl + S), Go to the console and run the command

    flutter run

    It will take some time, but the issue that you were facing will be solved.

提交回复
热议问题