9

Recently i updated my android studio to 0 .30 I was trying to import project in android studion.

Project is using an old version of the Android Gradle plug-in. The minimum supported version is 0.6.1.

Please update the version of the dependency 'com.android.tools.build:gradle' in your build.gradle files.

Consult IDE log for more details (Help | Show Log)

2nd error

You are using an old, unsupported version of Gradle. Please use version 1.8 or greater. Please point to a supported Gradle version in the project's Gradle settings or in
the project's Gradle wrapper (if applicable.) Consult IDE log for more details (Help | Show Log

3rd error

Could not execute build using Gradle distribution ' http://services.gradle.org/distributions/gradle-1.6-bin.zip'. Build file 'C:\Users\Asthme\crushersblue1\babies\build.gradle' line: 8

Could not find method classpath() for arguments
[com.android.tools.build:gradle:0.6.+] on project ':crushersblue1:babies'.

Consult IDE log for more details (Help | Show Log)

Serguei Fedorov
  • 7,763
  • 9
  • 63
  • 94
Asthme
  • 5,163
  • 6
  • 47
  • 65

5 Answers5

6

Step 1: Change line in build.gradle from:

dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}

Step 2:

In the YourProject.iml file, delete the entire component name="FacetManager" tag.

Step 3

(Maybe not necessary): In the Android SDK manager, install (if not already installed) Android Support Repository under Extras.

Refer this

Linga
  • 10,379
  • 10
  • 52
  • 104
5

I was able to fix this by using the file path to my gradle directory:

C:\Users\xxxx.gradle\wrapper\dists\gradle-1.12-all\2apkk7d25miauqf1pdjp1bm0uo\gradle-1.12

the import continued fine.

SamWise
  • 698
  • 10
  • 16
2

This is duplicate of Unable to import Eclipse project to Android Studio (when using default gradle wrapper)

Answer:

I had to edit the gradle wrapper settings in gradle/wrapper/gradle-wrapper.properties and change gradle version to 1.8.

./gradle/wrapper/gradle-wrapper.properties :

#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip

I had to change gradle-1.6-bin.zip to gradle-1.8-bin.zip. I guess the old ADT plugin from eclipse which generates this file still uses the old URL.

Community
  • 1
  • 1
Binoy Babu
  • 16,699
  • 17
  • 91
  • 134
  • What error are you getting now while using default gradle wrapper? – Binoy Babu Nov 21 '13 at 02:08
  • so many error when i fix one,i will get diff error ,at last i gave up to android studio,working on eclispe . – Asthme Nov 21 '13 at 07:13
  • Delete all AS/gradle related files/folders from the project. Then reexport the project using eclipse and generate build.gradle . Now make sure you have the latest and unmodified and fresh AS installation. Follow the steps mentioned in my post linked above and tell me what error you get. – Binoy Babu Nov 21 '13 at 09:10
  • ,how to import project with library like actionbarsherlock .because it has own project. – Asthme Nov 21 '13 at 11:23
  • Were you able to import the project? You can add abs as either a module dependency or a maven dependency or a regular jar dependency. – Binoy Babu Nov 22 '13 at 16:18
  • You have to mention the errors you're are getting instead of just saying "It's not working". You have to be more specific and clear. – Binoy Babu Nov 26 '13 at 16:10
1

If all the other solutions here do not work (they are all from 3 days ago)... I found...

I had secondary project in my settings.gradle and each of those projects had their own build.gradle. The Android Studio IDE says that you need to uddate to 0.6.1 but it points to only the first-project build.gradle - I had to manually locate the secondary build.gradle file for those projects and make sure all said 0.6.+ instead of previous versions.

0

Change gradle to 0.6.+ as ling has suggested, and also in your gradle-wrapper.properties file, change the distributionUrl to http\://services.gradle.org/distributions/gradle-1.8-bin.zip.

Adam Johns
  • 35,397
  • 25
  • 123
  • 176