Could not locate the Android SDK at the given path

You must Login before you can answer or comment on any questions.

My new Win 7 TI Studio install does not recognize Android SDK is installed.

Followed all setup steps very carefully.
Uninstalled and re-installed Android SDK after discovering issue regarding spaces in C:\program files. Modified the path and %android_sdk% values. Verified.

I can run Android virtual device "titanium_7_HVGA" straight from AVD Manager.

When attempting to set TI Studio preference "Android SDK Directory", by browsing to the folder, "C:\Android\android-sdk", the drop down list "Default Android SDK" is blank and an error is displayed: "Could not locate the Android SDK at the given path". Grrrr...Any ideas? Would bad GIT install cause this? Just trying to run a new simple mobile project.

— asked 2 years ago by Joe Corriere
2 Comments
  • I have the same problem but on Mac OSX.

    Unzip the zip from Android, copy folder in my user folder then rename to android-sdk

    Add android-sdk/tools and android-sdk/platform-tools to my PATH so I can run command android, adb from anywhere.

    I dont see any virtual devices in the AVD Manager

    In Installed packages I have :

    • Android SDK Tools, revision 12
    • Android SDK Platform-tools, revision 6
    • Documentation for Android SDK, API 13, revision 1
    • SDK Platform Android 3.2, API 13, revision 1
    • SDK Platform Android 2.3.3, API 10, revision 1
    • Samples for SDK API 13, revision 1
    • Samples for SDK API 10, revision 1
    • Android Compatibility package, revision 3

    When I open Titanium Studio and create a new mobile project, android is not checked, so I tried to configure by selecting the android-sdk folder in my user folder and I get "Could not locate the Android SDK at the given path"

    Help please :)

    — commented 2 years ago by Alixe Bhagooa

  • I had a MAC with Mac OSX 10.6.7 - Titanium Studio build: 1.0.2.201107130739 Same problem as before. But I resolved by re-installing TiStudio. Still testing, but looks good so far.

    — commented 2 years ago by vincent youmans

12 Answers

Solved my own problem! I began looking at androidsdk.py (although I don't speak .py). I found the logic that identifies the SDK location.

//---------------------------// def find_platform_dir(self): .. .... ...... raise Exception("No \"%s\" or \"%s\" in the Android SDK" ...... //---------------------------//

Open TI Studio, Help > Titanium Studio > View Log File. The log file shows [Exception: No "android-7" or "android-2.1" in the Android SDK]. GASP!!! I only installed Android SDK 2.3.3 API 8 --> SDK 3.2 API 13.


To resolve problem: Open Android SDK Manager and installed ANDROID SDK 2.1-update1 API 7. Using TI Studio open preferences and browse to SDK folder. Now ALL ANDROID SDK versions appear in drop down list and the app runs in the emulator! ...WooHoo! Thanks Me!


— answered 2 years ago by Joe Corriere
answer permalink
5 Comments
  • Can someone please mark my answer as best answer, because I cannot mark my own and this solution required NO changes to any files or directories. JC.

    — commented 2 years ago by Joe Corriere

  • This solution worked for me too

    — commented 2 years ago by Kent Petersen

  • Indeed voted you high. Thanks man.

    — commented 2 years ago by Ragu Kattinakere

  • Show 2 more comments

in your android-sdk/platforms folder do you have an android-7 folder? If not, create one, see if that doesn't resolve the problem. I vaguely remember there being a problem with the installer/check scripts if that api target was missing (even if you never target it)

Also, be sure in that dialog, you select the parent folder of platforms. Sometimes zips/installers like to put stuff multiple directories below where you intended. In your case, is platforms at (c:\Android\android-sdk\platforms)?

— answered 2 years ago by Stephen Feather
answer permalink
1 Comment
  • your "android-7 folder" idea probably would also correct this issue. The androidsdk.py sets the DEFAULT_API_LEVEL = 7 and later attempts to join values from the PATH variables with this value. And ultimately the exception, "No "android-7" or "android-2.1" in the Android SDK" is thrown. JC.

    — commented 2 years ago by Joe Corriere

I had the very same error message but a different underlying problem (Win7 32bit). I had all the SDKs installed (4,7,10,13) and all folders were at the right place. But still I got the error.

The problem in my case was that I had put the value of the environment variable ANDROID_SDK into quotes "C:\Android\android-sdk". So the above mentioned androidsdk.py was looking for the folder "C:\Android\android-sdk"\platforms\android-7 which fails.

Removing the quotes from the PATH and ANDROID_SDK variable solved the problem.

had the same problem - ts could not locate android sdk on windows 7.

tried everything suggested here. nothing worked.

my config:

-- win 7 64 bit;

-- android sdk (3-14 levels);

-- titanium sdk 1.7.3


found solution for my case:

-- opened ti log file and saw: DEFAULT_API_LEVEL is not defined;

-- opened file androidsdk.py (in my case, which is default installation, it is C:\Users\<my user name>\AppData\Roaming\Titanium\mobilesdk\win32\1.7.3\android);

-- added one line of code right under import statements:

DEFAULT_API_LEVEL = 7

-- opened ts again, and - YESSSS - ts did recognized the SDK!

hope it helps...

Solved in Windows 7 with this suggestion. Ensured the value of ANDROID_SDK variable was set at the correct path, which in my case is: C:\Android\android-sdk (I recommend not using Default installation path which can lead to another issues with the ADV for it being a long name with spaces in it. ej: Program Files)

had the same problem - ts could not locate android sdk on windows 7.

tried everything suggested here. nothing worked.

my config:

-- win 7 64 bit;

-- android sdk (3-14 levels);

-- titanium sdk 1.7.3


found solution for my case:

-- opened ti log file and saw: DEFAULT_API_LEVEL is not defined;

-- opened file androidsdk.py (in my case, which is default installation, it is C:\Users\<my user name>\AppData\Roaming\Titanium\mobilesdk\win32\1.7.3\android);

-- added one line of code right under import statements:

DEFAULT_API_LEVEL = 7

-- opened ts again, and - YESSSS - ts did recognized the SDK!

hope it helps...

— answered 2 years ago by yury bogomo
answer permalink
2 Comments
  • sorry for double posting - i did not do that :-((

    this q&a page did...

    — commented 2 years ago by yury bogomo

  • Tnx! works perfect!

    — commented 1 year ago by bart boos

Solved in windows 7 by creating an android-7 folder my android-sdk/platforms folder.

Wow, it blows my mind that anyone can release software that has not been tested. I'm dumbstruck that 7 months after the issues were picked up by other people, they were still not fixed.

Your Answer

Think you can help? Login to answer this question!