deepmindz
deepmindz

Reputation: 608

Gradle Sync not refreshing project after android studio update

I just downloaded the Android Studio 1.2 package into my download folder and ran the studio.sh file. I then imported my settings from a settings.jar file that I exported from my previous Android Studio version of 1.0. I then moved the android-studio folder from my download folder to my desktop. When I restarted studio.sh, and tried to build one of my projects, I got this error:

Gradle 'cdm-android' project refresh failed
 Error:/home/ryan/Downloads/android-studio/gradle/gradle-2.4/lib/plugins/gradle-ide-2.4.jar (No such file or directory)

I've tried looking up my gradle settings but couldn't find any references or indications on why the gradle-ide-2.4.jar path hadn't changed. How do I fix this error?

UPDATE: The new gradle-ide-2.4.jar path is /home/ryan/Desktop/android-studio/gradle/gradle-2.4/lib/plugins/gradle-ide-2.4.jar. I want to know how I can tell Android Studio to update their path configurations.

Upvotes: 0

Views: 2522

Answers (2)

warrenbuffering
warrenbuffering

Reputation: 242

Same issue. Was able to update my project using

1) (in project directory) mkdir android/app/src/main/assets
2) react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
3) react-native run-android

Frustrating this has to be done every time, but at least it's working.

Upvotes: 0

Pablo
Pablo

Reputation: 642

Go to File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle.

Choose "Use default gradle wrapper". If that doesn't solve the problem (or is already selected), choose "Use local gradle distribution" and point to your local gradle folder. In my machine, it's in android-studio/gradle/gradle-2.4, so, in your case, it is in /home/ryan/Desktop/android-studio/gradle/gradle-2.4 .

Refresh your project again and get back to development!

Upvotes: 1

Related Questions