Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not fetch model of type 'IdeaProject' using Gradle installation

I've downloaded and installed Android Studio with all the required dependencies such as JDK 1.7 and Gradle 1.6. I am able to import the projects and modules quite comfortably in Studio, but when I try to create a new project I am getting errors like this:

Image

Since this is the new born IDE I couldn't find much details on this, except for this and this. Any help would be greatly appreciated.

like image 885
KunalK Avatar asked May 17 '13 12:05

KunalK


4 Answers

After to pass much time trying to resolve this, i reached a solution :

Are you using "Windows Version" of AS ?

Please follow these steps :

1 - Install the last version of JDK with respective JAVA_HOME variable.

2 - Download and Install Gradle1.6 with respective GRADLE_HOME variable,

http://www.gradle.org/docs/current/userguide/userguide_single.html#installation.

2 - Delete these folders:

    C:\Users\youruser\.AndroidStudioPreview
    C:\Users\youruser\.android
    C:\Users\youruser\.gradle

3 - Reopen Android Studio

Now probably it will works

There are a lot of bugs in "Early Access Preview"....

like image 146
natanaelfonseca Avatar answered Nov 16 '22 05:11

natanaelfonseca


The error dialog mentions Gradle 1.4

Android Studio requires the Gradle plugin 0.4 which requires Gradle 1.6

like image 31
Xavier Ducrohet Avatar answered Nov 16 '22 04:11

Xavier Ducrohet


I tried the environment variable and folder location stuff suggested, also made sure I had the latest version of Gradle, but that made no improvement. Then I ran Android Studio using an admin account, at which point all the errors disappeared. If you are able to, I suggest you do the same. This was on a Windows 7 box.

like image 1
Jim McNeill Avatar answered Nov 16 '22 04:11

Jim McNeill


For me, this problem was caused by my local.properties file showing a different path to the Android SDK. I do development on both Mac OS X and Windows and the properties file was showing my Mac OS X SDK path. Turns out, this file shouldnt even be checked into source control. Ooops!

like image 1
Kilhoffer Avatar answered Nov 16 '22 05:11

Kilhoffer