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
]
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.
-
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?
-
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.
-
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
-
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
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: