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:
.gradle
.Invalidate Cache/Restart
from File
in Android Studio.Here's what I've tried in addition to the above list.
C:/Users/<username>/.android<>
old directories.%temp%
folder.This project works well in all PCs with Android Studio except this one.
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 deleted the .gradle
folder inside the project structure. What you have to do is delete the .gradle
folder located in
Windows:
C:/Users/<username>/.gradle.
MacOS:
~/Users/<username>/.gradle
To view hidden files on Mac press command+shift+.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With