Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import of Eclipse project into Android Studio using build.gradle file fails

I'm trying to import my Eclipse based Android project using the build.gradle file. I get the following message: "failed to find Build Tools revision 18.0.0". However, according to the Android SDK Manager, I have Android SDK Build-tools 18.0.1 installed.

I am doing all this on a 64-bit Windows 7 machine, if that's relevant.

How do I fix this?

UPDATE: I actually only updated to Build-tools 18.0.1 this morning. I then noticed that, when making a new project in Android Studio, it wouldn't allow me to create a project using Android 4.3 (4.2.2 was the latest allowable version). I tried dropping the target version of my project to Android 4.2.2, and re-exporting it. Now Android Studio complains about not being able to find Build-tools 18.0.1 when I try to import this project.

like image 315
Ogre Avatar asked Aug 02 '13 00:08

Ogre


2 Answers

I was an Android Studio virgin too up until 10 minutes ago. I ran into the same problem. If you check your SDK Manager in Android Studio (or Eclipse I believe) it will show which tools you have installed. I am/was missing build tools 18.0.1 too and getting the error....but it was because I hadn't installed them.

So without modifying the Gradle build files, I was able to install the build tools using the SDK Manager and get everything up and running.

See this image: enter image description here

As an aside, I also had to update the API version as well because it selected an API version that wasn't installed (which I don't get because it was when I compiled with Eclipse).

Hope this helps.

like image 57
Michael Stoner Avatar answered Nov 03 '22 10:11

Michael Stoner


This did the trick for me.

In build.gradle file inside the main module modify the line

buildToolsVersion "18.0.0" 

to

buildToolsVersion "18.0.1"
like image 29
Dheeraj Bhaskar Avatar answered Nov 03 '22 08:11

Dheeraj Bhaskar