1

I'm trying to migrate my android projects from Eclipse to Android Studio v1.0.1 in MAC

If I create a new project everything works fine but if I import one of my projects from Eclipse I get the following error:

Error:A problem occurred configuring project ':MyProject'. SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

My local.properties file already has the correct path to the SDK (which I already had installed when I downloaded the ADT bundle for Eclipse)

I also defined ANDROID_HOME environment variable like the answer of this question suggest Setting ANDROID_HOME enviromental variable on Mac OS X

but the error remains. I think there might be something wrong exporting from Eclipse with Gradle or something like that but I really have no clue how to fix it.

Hope anyone can help. Thanks in advance

Community
  • 1
  • 1
Carla Urrea Stabile
  • 869
  • 1
  • 11
  • 35
  • I guess you could always do the annoyingly long way haha. Start a new project and slowly copy and paste code in the hopes that gradle actually updates itself properly. It's a hassle, but if you still haven't found a solution and you really need the project to work on Android Studio, there's always that option as a last resort. Since isn't really a solution to your problem. I'm only posting this as a comment rather than an answer. – Mikey May 04 '15 at 13:46

3 Answers3

4

you may need to move the settings.gradle file to the project folder
I had the same problem and after changing the file location to the project folder everything goes right.
Hope this helps!

molhamaleh
  • 353
  • 3
  • 9
0

I hope you are following the instructions here https://developer.android.com/sdk/installing/migrate.html

G3M
  • 1,023
  • 8
  • 19
0

Check if SDK location is correct 1 - Open Android Studio

2 - Up, Left corner click File->Settings

3 - Look for Appearance & Behavior -> Android SDK

4 - Click Edit, and browse you SDK location (usually is in :Users\\AppData\Local\Android\Sdk) https://i.stack.imgur.com/twvfC.png


Check if path on local.properties is correctly setted too.

Tomás Rodrigues
  • 519
  • 2
  • 17