Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle project refresh failed. Android Studio

Tags:

android

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 locate factory for objects of type DefaultGradleConnector, as ConnectorServiceRegistry has been closed. 
like image 874
Ronny K Avatar asked Dec 31 '14 18:12

Ronny K


People also ask

Why is my gradle project Sync failed?

Bad internet connection: Since Gradle downloads all the missing versions which are required to run your project, it might fail if you don't have a valid internet connection. Issues in Gradle compiler: There might be cases where your Gradle compiler is not working properly.

What does refresh gradle project do?

Reload a linked Gradle project In the Gradle tool window, right-click a linked project. On invoking this action, IntelliJ IDEA parses the project structure in the Gradle tool window. IntelliJ IDEA cannot reload just a part of your project, it reloads the whole project including modules and dependencies.


Video Answer


2 Answers

Restarting Android Studio usually fixes this error for me.

like image 106
shimul Avatar answered Sep 29 '22 15:09

shimul


You can restart android studio like this:

Click File ----> Invalidate Caches /Restart

enter image description here

It works for me!

like image 41
GeekHades Avatar answered Sep 29 '22 15:09

GeekHades