Titanium Studio cannot find Android SDK (tried multiple solutions)

Brady picture Brady · Feb 22, 2012 · Viewed 12.9k times · Source

Okay. I'm kind of at my wits' end here. I've been trying for about 2 days to set up Titanium Studio to recognize and connect to the Android SDK (Windows 7). I have tried multiple solutions (below) with no luck. There's got to be something I'm missing. I've tried Google and the Titanium developer guides. So this is my last straw. Any ideas?

  • Android SDK home path is C:\Android\android-sdk (to avoid spaces with "Program Files")
  • installed all SDKs (3,4,7,8,10,11,12,13,14,15), their Samples, and all Google APIs
  • installed all "Extras" packages
  • Added both the Android tools and platform-tools directories to Windows' PATH variable
  • Copied adb.exe from platform-tools to tools as Titanium likes to look there for adb
  • Installed the current master build of Titanium SDK for Mobile Devices
  • Created Android Virtual Devices (AVDs) for SDKs 7 and 8 (Titanium's required SDKs)
  • Restarted adb server and computer itself after each change

On the Titanium 'Dashboard' tab, under 'Configure', I get:

An Android SDK is missing. Titanium requires Android platforms 2.1.* and 2.2.*

When attempting to set the default Android SDK path in 'Preferences', I get:

Could not locate the Android SDK at the given path

Titanium log file output (sorry, kinda long):

 !ENTRY com.appcelerator.titanium.mobile 4 0 2012-02-22 14:06:21.992
!MESSAGE (Build 1.0.0.1327639206) [ERROR]  [ERROR] The system cannot find the path specified.
[ERROR] The system cannot find the path specified.
Traceback (most recent call last):
  File "C:\Users\Stick\AppData\Roaming\Titanium\mobilesdk\win32\2.0.0.v20120221190136\android\avd.py", line 45, in <module>
    print get_avds(sdk)
  File "C:\Users\Stick\AppData\Roaming\Titanium\mobilesdk\win32\2.0.0.v20120221190136\android\avd.py", line 21, in get_avds
    for line in run.run([sdk.get_android(),'list','target'],debug=False).split("\n"):
AttributeError: 'NoneType' object has no attribute 'split'

I have no idea what's missing. Eclipse recognizes everything just fine. ANY suggestions??

P.S. I've noticed that when I attempt to run 'android' commands, i.e.

android
android list targets

I get what seems to be an error:

The system cannot find the path specified.

However, the commands still continue to run with no issues (I get a list of all the targets and the SDK Manager pops up). I'm not sure whether or not whatever is causing that message is also causing Titanium headaches.

Answer

Imran Latif picture Imran Latif · Mar 27, 2012

I was facing the exact same issue, but now I have figured this out and it was working fine.

Basically, when I install Titanium Studio and I configure Android SDK it worked fine, but when I try to execute Project there was "javac not found" error. While resolving this issue I came across a Post where it was mentioned to include '%JAVA_HOME;%' in your Path. And when I did this the Android SDK was not longer detected by Titanium.

I removed the '%JAVA_HOME%' from Path Variable and then I include Java bin Folder Path to Path Variable and created a new variable 'JAVA_HOME' which points to root directory of Java installation. Everything works fine after doing this step.

I hope you will now get your Titanium Environment running. :-)

Thanks.