简体   繁体   中英

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: 在此输入图像描述

  2. When I opened the gradle-wrapper.properties file,I found as following: 在此输入图像描述

  3. When I checked the directory " android-studio/gradle/gradle-2.4/lib/plugins/ " I found the file " gradle-diagnostics-2.4.jar ". 在此输入图像描述

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

Please help me to solve the problem.

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!

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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM