Reputation: 1823
I installed new Android Studio 0.1.1 based on IDEA ide and tried Import code from Eclipse.
I explore this problem and find the weak point: in file build.gradle I change next lines:
And it fix my problem with project import. I think it's problem in Eclipse export function. Build tools starts only from version 17 (in ADT 22), so it's imposible to find version 15.
Upvotes: 30
Views: 34634
Reputation: 76
In the file build.gradle change your compileSdkVersion to your current version. For me it is 23. Your buildToolsVersion would be the same number. Hence the only thing I had to do was
Upvotes: 0
Reputation: 89
I simply solved the problem by changing the project build target (Project properties->Android->Project Build Target).
Upvotes: 0
Reputation: 7952
Had the same problem when Android studio 0.2.9 on mac and importing an old eclipse project:
By default, it uses /Applications/Android Studio.app/sdk as the android sdk location, instead of whatever you used to use.
On a per-project basis, you can go to the menu's File->Project Structure (command-;) and on the left you can change the project's sdk location.
To handle all projects (new or imported), before opening anything at the start screen click configure -> Project Defaults -> Project Structure -> (on the left) Android SDK to do the same. (re: https://stackoverflow.com/a/18409923/954643)
If you were starting from scratch without any android sdk setup and eclipse though, you'd have to download the missing SDKs via Tools->Android->SDK Manager.
Upvotes: 0
Reputation: 2346
For general 'import project' info, search for the word 'import' on this install-guide document for Android Studio:
http://developer.android.com/sdk/installing/studio.html
EDIT: I've recently learned to use the 'import' dialog, so that I can
import projects from GitHub, which is very cool! (I first watched a tutorial
on YouTube titled 'git and github'). Then I learned that one needs to
use 'git' to "Clone" an entire GitHub repository (to bring a dir-tree full
of separate projects to your development machine). Then, you can navigate
into that sub-tree, to a given project of interest, and then use Android
Studio's 'import' dialog to play with that example project.
WOW, NEAT!
Hope this helps...
Upvotes: 0
Reputation: 1386
These simple steps worked for me:
Enjoy :)
Upvotes: 2
Reputation: 1741
Had same problem, now works. I did this:
Open android studio:
Tools -> android -> SDK manager then install the android 4.0.3 (API 15) and done.
It worked for me.
Upvotes: 10
Reputation: 404
From the quick start window, choose Configure, then choose Project Defaults, and then choose Project Structure. Then on the left under Platform Settings choose SDKs. Then to the right of that choose the current android platform, mine was Android 4.2.2 Platform, and delete it using the red minus button at the top, then add a new android platform using the green plus button at the top and point it to your current SDK folder and that is it.
Upvotes: -1
Reputation: 1978
Update your android APIs using Android SDK Manager.It seems you have installed API lower than level 15.
Upvotes: 0
Reputation: 119
Update SDK go to config settings, project settings then you will see SDK that isn't correct point to same place eclipse points to for SDK. Worked for me.
Also it might help to reexport the project with new sdk
Upvotes: 0
Reputation: 2196
This is an import problem. NOT an SDK Level issue.
You need version 22 of the SDK Manager before you attempt the export or it won't be in a format that Android Studio can consume.
Upvotes: 1
Reputation: 627
Do you have updated SDK for Eclipse? You need the Rev.22. After you downloaded it, you can Export the Project with a "build.gradle".
Upvotes: 0