Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Android Build Fails Silently

Hi,

Having an issue with the Android end of Titanium. I can't seem to figure out why I can't build the default application (created via the Titanium app) under Android – i just locks up and presents no error. Here is the output from Titanium:

[INFO] Launching Android emulator...one moment
[INFO] Building TestApp for Android ... one moment

[UPDATE:
[INFO] Launching Android emulator...one moment
[DEBUG] From: /Users/johnlewis/Documents/Android/android-sdk-mac_86/tools/emulator
[DEBUG] SDCard: /Users/johnlewis/.titanium/android2.sdcard
[DEBUG] AVD ID: 1
[DEBUG] AVD Skin: HVGA
[DEBUG] SDK: /Users/johnlewis/Documents/Android/android-sdk-mac_86
[TRACE] Traceback (most recent call last):
[TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 991, in <module>
[TRACE] s.run_emulator(avd_id,avd_skin)
[TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 246, in run_emulator
[TRACE] devices = self.sdk.list_devices()
[TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/androidsdk.py", line 166, in list_devices
[TRACE] (out, err) = subprocess.Popen([adb, 'devices'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
[TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
[TRACE] errread, errwrite)
[TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
[TRACE] raise child_exception
[TRACE] OSError: [Errno 2] No such file or directory
[INFO] Building JMD Beta for Android ... one moment
[DEBUG] Waiting for device to be ready ...
[TRACE] Traceback (most recent call last):
[TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 995, in <module>
[TRACE] s.build_and_run(False,avd_id)
[TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 768, in build_and_run
[TRACE] self.wait_for_device('e')
[TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 166, in wait_for_device
[TRACE] devices = self.sdk.list_devices()
[TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/androidsdk.py", line 166, in list_devices
[TRACE] (out, err) = subprocess.Popen([adb, 'devices'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
[TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
[TRACE] errread, errwrite)
[TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
[TRACE] raise child_exception
[TRACE] OSError: [Errno 2] No such file or directory
]
— asked December 6th 2010 by Seth Benjamin
  • android
  • android app build wont run
0 Comments

5 Answers

  • Accepted Answer

    Don answered the question but I figured I'd post it as an "answer" since notifications don't work for new comments.

    In your android-sdk root there are "platform-tools" and "tools" directories. By default, the adb executable is located in "platform-tools" but Titanium seems to be looking for it in "tools" (where it used to be?) So all you have to do is copy/paste the adb executable to "tools" and then the simulator loads right up.

    I've only tried this on the 1.5 CI build but I see no reason why it shouldn't work for 1.4 builds as well, as both were giving me the same exact error yesterday.

    — answered December 7th 2010 by Justin Toth
    permalink
    0 Comments
  • Switch the log level from Info to Trace in the Ti Developer app and then paste here the results. You have already downloaded/installed the Android SDK 1.6 and Google APIS 1.6 and pointed to it in Edit Profile?

    — answered December 6th 2010 by Justin Toth
    permalink
    5 Comments
    • updated my question, and to answer yours – i believe I did but then again its bee a long day.

      — commented December 6th 2010 by Seth Benjamin
    • I have the android sim working for win 7 but just tried it for the first time in osx and run into the same issue as you and steve. I tried the latest release build of titanium as well as the latest 1.4 & 1.5 CI builds with no success. Titanium trips up when trying to find the adb executable for some reason, even though the android sdk directory is set correctly. I'm stuck on this as well so we're going to need a Ti employee to help us with this I think…

      — commented December 6th 2010 by Justin Toth
    • Can someone add a link to a pastie containing the entire Trace log? Or is that fragment above the entire log?

      — commented December 6th 2010 by Don Thorp
    • I linked to my entire Trace log above, Don, but here's a Pastie as well:

      http://pastie.org/1353903

      — commented December 6th 2010 by Peter Berg
    • Thanks for looking into this, Don. Below is the output for Ti 1.5.0 but you get the same error in 1.4.3:

      http://pastebin.com/QENdU57K

      — commented December 6th 2010 by Justin Toth
  • What sticks out to me in that trace is: OSError: [Errno 2] No such file or directory…

    I would make sure you have downloaded all the updates. And point the SDK to APIs 1.6 and then launching.

    I would also check if the AVD's are being created by opening 'android' within Tools.

    It doesn't hurt to clear your build/android folder.

    — answered December 6th 2010 by John Welch
    permalink
    0 Comments
  • I'm getting the same thing. Running on Snow Leopard. Everything seems to be installed.

    [DEBUG] Waiting for device to be ready ...
    [TRACE] Traceback (most recent call last):
    [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 995, in <module>
    [TRACE] s.build_and_run(False,avd_id)
    [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 768, in build_and_run
    [TRACE] self.wait_for_device('e')
    [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 166, in wait_for_device
    [TRACE] devices = self.sdk.list_devices()
    [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/androidsdk.py", line 166, in list_devices
    [TRACE] (out, err) = subprocess.Popen([adb, 'devices'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
    [TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
    [TRACE] errread, errwrite)
    [TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
    [TRACE] raise child_exception
    [TRACE] OSError: [Errno 2] No such file or directory
    
    — answered December 6th 2010 by steve mcl
    permalink
    0 Comments
  • I, too, am having this exact same problem, which started today for the first time (things were working ok yesterday). I've read everything I can get my hands on, both here and through multiple Google searches, all to no avail.

    Any suggestions or insight would be appreciated more than I can tell you.

    I'm running the following:

    • OS X 10.6.5
    • Java 1.6.0_22 (installed XCode yesterday with all the latest files)
    • Titanium Developer 1.2.1 (with mobile sdk versions 1.2 and 1.4.2)

    Yesterday I was able to get Titanium to build KitchenSink as well as a couple of my own super basic HelloWorld style apps.

    However, I was having major issues with getting Google Maps to run in the Android emulator (couldn't get it working with my own API key), so I removed my Android SDK, removed the .android directory in my user folder, uninstalled Titanium (also cleared out all the preferences in /Library/Application Support/Titanium ) and re-installed everything from scratch, according to the Appcelerator Get Started document (which I also followed for the first install yesterday).

    I reinstalled the Android SDK and installed all the most recent packages from Google (everything from 1.5 to 2.3).

    NOTE: After a fresh install of the SDK, there were no virtual devices listed in the manager, and I didn't create any, either. Titanium also fails to create any AVDs as well.

    This is what my Android SDK manager looks like now:

    http://img.skitch.com/20101206-kgsk6tx34ybtxtq5s4t6xh3es3.jpg
    picture

    Whenever I try to run any sort of project in Titanium now, I get the same style of error as described above:

    • I hit "launch", having chosen one of the API versions (doesn't matter which number, btw)
    • The Titanium log says it's launching the emulator, but nothing ever happens beyond that.

    Here's the full [Trace] level output, from start to finish:

    [INFO] Launching Android emulator...one moment
    [DEBUG] From: /Users/aleman/android-sdk/tools/emulator
    [DEBUG] SDCard: /Users/aleman/.titanium/android2.sdcard
    [DEBUG] AVD ID: 11
    [DEBUG] AVD Skin: HVGA
    [DEBUG] SDK: /Users/aleman/android-sdk
    [TRACE] Traceback (most recent call last):
    [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 991, in <module>
    [TRACE] s.run_emulator(avd_id,avd_skin)
    [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 246, in run_emulator
    [TRACE] devices = self.sdk.list_devices()
    [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/androidsdk.py", line 166, in list_devices
    [TRACE] (out, err) = subprocess.Popen([adb, 'devices'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
    [TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
    [TRACE] errread, errwrite)
    [TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
    [TRACE] raise child_exception
    [TRACE] OSError: [Errno 2] No such file or directory
    [INFO] Building Hello World for Android ... one moment
    [DEBUG] Waiting for device to be ready ...
    [TRACE] Traceback (most recent call last):
    [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 995, in <module>
    [TRACE] s.build_and_run(False,avd_id)
    [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 768, in build_and_run
    [TRACE] self.wait_for_device('e')
    [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/builder.py", line 166, in wait_for_device
    [TRACE] devices = self.sdk.list_devices()
    [TRACE] File "/Library/Application Support/Titanium/mobilesdk/osx/1.4.2/android/androidsdk.py", line 166, in list_devices
    [TRACE] (out, err) = subprocess.Popen([adb, 'devices'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
    [TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
    [TRACE] errread, errwrite)
    [TRACE] File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
    [TRACE] raise child_exception
    [TRACE] OSError: [Errno 2] No such file or directory
    

    Pastie with the same Trace output:

    http://pastie.org/1353903

    — answered December 6th 2010 by Peter Berg
    permalink
    1 Comment
    • Google changed their tooling again today with the v8 tools. We have a patch in for the upcoming 1.5 that went in a few hours ago. You can try creating a tools folder and copying back adb into it to see if that lets you get past it.

      — commented December 7th 2010 by Don Thorp
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.