Importing gradle project, android error

13,664

Add file local.properties to your project root folder. There you should write location of your Android SDK like this:

sdk.dir=/Users/ab/Android/adt-bundle-mac-x86_64-20130917/sdk
Share:
13,664
Admin
Author by

Admin

Updated on June 08, 2022

Comments

  • Admin
    Admin almost 2 years

    I am trying to import a libgdx project (desktop, ios and android) to eclipse on my mac, which I have in my local git repository.

    When I try to import my project to eclipse ( Import >> Gradle >> Gradle Project, and then add my Root Folder for the whole libgdx project), I try to "Build Model", but then I get an error saying:

    "SDK location not Found. Define location with sdk.dir in the local.properties file or with and ANDROID_HOME environment variable"
    

    I have already set my ANDROID_HOME with

    export ANDROID_HOME=/Development/Tools/android-sdk-mac
    export PATH=$PATH:$ANDROID_HOME/bin
    

    but I still get the same error and it doesn't work.

    The project was originally created on my windows computer (where everything is working fine) and used git to also have it on my mac for ios stuff.

    I have also tried importing it as a local git repo ( Import >> Git >> Projects from Git >> Existing local repository, added the path to the project). When I then choose the wizard for project import as "Import existing projects" it finds none. And when I import as "Use the New Project wizard" and "Import as general project" it doesn't work and I can't run my projects (desktop, ios and android) and sometimes I don't even get my project files up in eclipse.

    What am I doing wrong and how can I fix this?

    PS: Directory:

    -SpeedRun
    --SpeedRun-android
    --SpeedRun-desktop
    --SpeedRun-ios
    

    --SpeedRun-core