5
votes

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.

3

3 Answers

2
votes

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.

1
votes

Newer version of Titanium have the Update Android SDK option in the Dashboard. Just make sure, the path is correct. Some cases like mine, there might be two Android SDK paths; one was obsolete and the other was active. So, please make sure of that path. When Titatnium is about to update the SDK software, looking in for newer versions, please select Cancel, as that wouldn't be required!

0
votes
  1. open titanium ide.
  2. click on file-> titanium mobile project.
  3. a window will show up with a link Set-up/Configure SDKs in the bottom. click on this link.
  4. now give android sdk home: c:\Androi\android-sdk (or browse to android-sdk folder in your system)
  5. select the default Android Sdk
  6. click Apply
  7. Click Ok.

You should be good to go. Let me know if you face any problems.