3

I am trying to start Android Studio for the first time but getting error mentioned below

enter image description here

Could someone please let me know how to solve this error?

Sudhir
  • 1,339
  • 2
  • 15
  • 36

3 Answers3

2

You need to set your JAVA_HOME path, which will allow Android Studio to run. Have you done that?
Here is how to do that:

  1. Right click your Computer icon, and click Properties
  2. Windows 8 Users: Then click Advanced System settings to your left.
  3. Now, go to the advanced tab, click Environment variables, under system variables, click New, and add a JAVA_HOME variable, it should look like this (relative to your jdk version, if its the latest it should be identical).

If you already have that covered I found a solution here that can help you:

  1. Go to your AndroidStudio directory where you installed your studio Like D:\User\AndroidStudio
  2. In AndroidStudio go to \AndroidStudio\plugins\gradle\lib and copy gradle.jar
  3. Paste this gradle.jar file to \AndroidStudio\lib directory.
  4. Download gradle directly from Gradle
  5. Copy the contents of gradle-1.7-bin.zip - After extracting zip file - (bin, media, init.d, lib folders) to \AndroidStudio\plugins\gradle
  6. Restart AndroidStudio
Community
  • 1
  • 1
Dyna
  • 2,304
  • 1
  • 14
  • 25
  • Dyna - Thank you for the help. After following above mentioned steps, error "org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings" was thrown. – Sudhir Sep 06 '13 at 14:43
0

http://developer.android.com/sdk/installing/studio.html#Troubleshooting

Scroll to the bottom.

Troubleshooting

Figure 1. Error dialog when opening an existing project.

Error: Gradle project refresh failed

Android Studio 0.2.0 has updated the Gradle plug-in to 0.5.0, which is not backwards compatible. When opening a project that uses an older version of the plug-in, Studio will display the error shown in figure 1 in the upper right corner of the IDE. To resolve the error, you must change the version of the Android Gradle plug-in to 0.5.0.

Click the link in the error dialog Search in build.gradle files. If the dialog is no longer visible, click Event Log in the bottom-right corner of the IDE, then click Search in build.gradle files. Double-click the line under the build.gradle usage. For example: classpath 'com.android.tools.build:gradle:0.4. This opens the project build.gradle file. Edit the classpath to change the gradle version to 0.5.+. For example:

dependencies {
  classpath 'com.android.tools.build:gradle:0.5.+'
}
Cœur
  • 37,241
  • 25
  • 195
  • 267
0

For me, I searched for task manager, opened it, went to more options, ended all background android studio tasks, and it worked.\

This happens because sometimes android studio does not fully close properly

Siddharth Agrawal
  • 2,960
  • 3
  • 16
  • 37