Skip to content Skip to sidebar Skip to footer

Android Studio 0.8.2 - Gradle Project Sync Failed

In hindsight I should not have enabled L build stuff. I am new to programming and I created a new Android Studio project which is throwing the Gradle errror right away. Errors are:

Solution 1:

I too faced the same issue and after days of trouble I figured it out. Just check if Java is installed

  • Open a Terminal window and type:

java -version

Any version above JDK 6 is OK

  • In terminal type

open -a TextEdit ~/.bash_profile

  • Copy and paste the following lines of into textedit

export JAVA_HOME=$(/usr/libexec/java_home)

export JDK_HOME=$(/usr/libexec/java_home)

  • Save it, close editor and type the following to apply changes

source ~/.bash_profile

Now try gradle sync now, you must be able to complete sync

Solution 2:

The most simple solution (at least for me) would be:

Go to SDK manager (with Administrator rights), scroll down till the end, download "Android Support Library".

And it works (don't forget Administrator rights).

Solution 3:

  1. Uncheck "Offline work" in File>Settings>Gradle>Global Gradle Settings
  2. Resync the project, for example by restarting the Android Studio.
  3. Once synced, you can check the option again to work offline
  4. Update java if Android L SDK installed

Solution 4:

For me Changing the JDK path worked. I changed it to /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home

in File--> ProjecStructure-> JDK location.

Solution 5:

  1. Open Gradle Settings in File > Settings > Gradle
  2. Select the Option 'Use local gradle distribution'
  3. Enter the URL of your local gradle version here.

Post a Comment for "Android Studio 0.8.2 - Gradle Project Sync Failed"