I get this error when trying to run my App on Android Studio. Does anyone know what the reason could be? Thanks.
Gradle \'MyApp\' refresh failed.
Error:Cannot l
Open Your Android Studio Terminal
Type command > gradlew clear
press Enter
and select option in
File > Invalidate Caches / Restart...
Then press Restart
button.
Now clear your app.gradle
.
Thank you.
Go to Terminal and type clearw Gradle -> press Enter -> after finish this step goto file menu choose Invalidate Caches /Restart-> press Yes
Working Solution :
File ->Invalidate Cache and Restart
Restarting Android Studio usually fixes this error for me.
You can restart android studio like this:
Click File ----> Invalidate Caches /Restart
It works for me!
If nothing worked, simple solution worked for me, you need to change maven version:
from
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
to
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
Android Maven Versions: Link
Android Maven Incompatible with gradle 2.14 Fix: Link