SyncFailed Error:Cause: org/jetbrains/plugins/gradle/tooling/ModelBuilderService

后端 未结 6 531
太阳男子
太阳男子 2020-12-31 05:56

I have a project which I try to open in Android Studio however when the project is imported I receive an error

Error:Cause: org/jetbrains/plugins/grad

相关标签:
6条回答
  • 2020-12-31 06:23

    Your Android Studio must be 3.4 or above Latest Version.

    And Gradle file should be:

    distributionBase=GRADLE_USER_HOME

    distributionPath=wrapper/dists

    zipStoreBase=GRADLE_USER_HOME

    zipStorePath=wrapper/dists

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

    These error comes when you used below Android Studio 3.4 Version.

    0 讨论(0)
  • 2020-12-31 06:24

    You may try the following steps:

    • Close Android Studio
    • Rename .gradle folder
    • Open project again

    After that Android studio will automatically download .gradle folder

    0 讨论(0)
  • 2020-12-31 06:26

    I had also this problem with android studio 3.1.1, it resolved by deleting latest gradle(for me 5.1.1) in .gradle folder I have to mention that gradle 5.1.1 is not compatible with 3.2 and older

    0 讨论(0)
  • 2020-12-31 06:33

    Here is a very simple solution,open your gradle-wrapper.properties file in your project and change your distributionUrl by downgrading/upgrading it.

    For example, if gradle 5.1 is giving you problems, you can downgrade to 4.9

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

    0 讨论(0)
  • 2020-12-31 06:38

    Upgrade the IDE to an updated version and remove it as versions that are not available in Android Studio that are on your computer. eg. AndroidStudio2.1 located in C:\Users\

    0 讨论(0)
  • 2020-12-31 06:46

    So the problem was solved by deleting the .gradle folder. Unfortunately none of the answers that I referred to described which .gradle folder I was supposed to delete.

    What I did was deleting the .gradle folder inside the project structure. Instead, you have to delete the .gradle folder located in

    Windows:

    C:/Users/<username>/.gradle.
    

    MacOS:

    ~/Users/<username>/.gradle
    

    To view hidden files on Mac press command+shift+.

    0 讨论(0)
提交回复
热议问题