'SyncFailed Error:Cause: org/jetbrains/plugins/gradle/tooling/ModelBuilderService
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/gradle/tooling/ModelBuilderService
I searched on google and found that this is a common issue faced on windows. However all the solutions provided are:
- Delete
.gradle. Invalidate Cache/RestartfromFilein Android Studio.- Delete debug folders and files.
Here's what I've tried in addition to the above list.
- Reinstalled Android Studio.
- Deleted Android Studio Settings manually from
C:/Users/<username>/.android<>old directories. - Deleted
%temp%folder.
This project works well in all PCs with Android Studio except this one.
Solution 1:[1]
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
Solution 2:[2]
You may try the following steps:
- Close Android Studio
- Rename .gradle folder
- Open project again
After that Android studio will automatically download .gradle folder
Solution 3:[3]
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.
Solution 4:[4]
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\
Solution 5:[5]
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
Solution 6:[6]
This one works for me.
Check your build gradle classpath version
Open the file
gradle>wrapper>gradlegradle-wrapper.propertiesin your projectCheck the version
Use this version in build gradle and sync the project
Solution 7:[7]
The steps below helped me get out of this situation:
Goto -> File -> Invalidate Caches / Restart -> Invalidate and Restart
if necessary cleans project and re-build Thanks!
Solution 8:[8]
Do this for the correct, fast and final solution..
Delete the following lines from the "gradle.propeties" file on your PC gradle installation location systemProp.http.proxyHost= systemProp.https.proxyHost= systemProp.https.proxyPort=80 systemProp.http.proxyPort=80
(Please note that this is not the "gradle.properties" in your project.. But rather the global one on your PC normally in the directory seen in my pictures.)
As seen in my picture below, here is a typical file location of this gradle.propeties file enter image description here
Now click rebuild in your project and VIOLA... Problem solved!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow



