Gradle Project update failed. Android Studio

I get this error when trying to run an application on Android Studio. Does anyone know what the reason is? Thank.

Gradle 'MyApp' refresh failed. Error:Cannot locate factory for objects of type DefaultGradleConnector, as ConnectorServiceRegistry has been closed. 
+56
android
Dec 31 '15 at 18:22
source share
6 answers

Restarting Android Studio usually fixes this error for me.

+91
Feb 21 '15 at 5:53
source share

You can restart android studio as follows:

Click File → Invalid Cache / Reboot

enter image description here

It works for me!

+49
Apr 11 '16 at 7:40
source share

Have you updated Android Studio to the latest version?

This is a bug that was present in RC1, but should be fixed in the latest version, according to:

https://code.google.com/p/android/issues/detail?id=80591

+4
Dec 31 '15 at 19:24
source share

Open Android Studio Terminal

A command like > gradlew clear press Enter and select an option in

File> Invalidate Caches / Restart ...

Then click the Restart button. Now clean your app.gradle .

Thank.

+3
Mar 07 '16 at 8:28
source share

If all else fails, a simple solution worked for me, you need to change the version of maven:

of

 classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' 

to

 classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' 

Android Maven Version: Link

Android Maven Incompatible with gradle 2.14 Fix: Link

+1
Sep 05 '16 at 12:10
source share

Go to the "Terminal" section and type clearw Gradle -> press Enter -> after completing this step. Goto file menu select Invalidate Caches / Restart-> click Yes

0
Sep 21 '17 at 4:18 on
source share



All Articles