Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio: Error:/android-studio/gradle/gradle-2.4/lib/plugins/gradle-diagnostics-2.4.jar (No such file or directory)

I've just installed Android Studio 1.3 into my Ubuntu 14.04 (64bit). I created a new project and after finishing the process Android Studio shows "Gradle 'MyApplication' project refresh failed".

I found same type of questions in Stackoverflow but any of the solution didn't fit for me. I couldn't figure out the problem.

Here are some screenshots:

  1. After creating a new project it shows the following message: enter image description here

  2. When I opened the gradle-wrapper.properties file,I found as following: enter image description here

  3. When I checked the directory "android-studio/gradle/gradle-2.4/lib/plugins/" I found the file "gradle-diagnostics-2.4.jar". enter image description here

  4. Here is the log file - http://pastebin.com/QdXxCVc6

Please help me to solve the problem.

like image 623
Abdullah Al Imran Avatar asked Aug 17 '15 11:08

Abdullah Al Imran


3 Answers

I had the same problem today when I upgraded from Android Studio 1.4 to 1.5. After some googling and checking stackoverflow threads I managed to found a solution by following these steps:-

  1. Create a new project and if that new project gets created successfully
  2. Open the gradle-wrapper.properties file
  3. Check the following line

distributionUrl=https://services.gradle.org/distributions/gradle-2.8-all.zip

  1. Take the version (in this example it's gradle-2.8-all.zip)
  2. Update the same version number in the gradle-wrapper.properties file where the error is encountered
  3. Do a gradle sync

This worked for me!

like image 139
Debashis Avatar answered Sep 24 '22 13:09

Debashis


this is not really an answer, but since i have not enough reputation to post a comment... anyway:

I just downloaded and installed android studio 1.3 on Mac OS. but i installed it on an EXTERNAL harddrive, both android studio and android sdk.

but gradle is still looking for an absolute default-path (/Applications/Android Studio.app/Contents/.../gradle-diagnostics-2.4.jar). maybe it could help you or somebody else to track down the error.

like image 37
rome Avatar answered Sep 23 '22 13:09

rome


I also faced the same error when I placed Android Studio into different directory.

The problem was solved by clicking File > Invalidate Caches / Restart.

like image 44
Kazuaki Tanida Avatar answered Sep 23 '22 13:09

Kazuaki Tanida