GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-01-24T03:36:42.000+0000 |
Affected Version/s | Release 2.1.1, Release 2.1.2, Release 2.1.3, Release 2.1.4, Release 3.0.0 |
Fix Version/s | Release 3.0.1, Release 3.1.0, 2012 Sprint 24, 2012 Sprint 24 JS |
Components | CLI |
Labels | core, emulator, qe-testadded, triage |
Reporter | Chaim Krause |
Assignee | Chris Barber |
Created | 2012-07-13T11:01:56.000+0000 |
Updated | 2013-10-03T07:19:24.000+0000 |
Problem description
Trying to launch the emulator using 'titanium emulator' in console fails.
1) --platform is listed as an optional parameter for emulator, but it is required.
2) When --platform=android is used, the command fails and the emulator is not run.
Steps to reproduce
From the console, run (in a project directory):
$ titanium emulator
required argument '--platform' missing
$ titanium emulator --platform=android
Invalid platform type: android
Additional note
Customer gets a different error:
$ titanium emulator --platform=android
Traceback (most recent call last):
File "/Users/chaim/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/android/builder.py", line 2081, in <module>
tiappxml = TiAppXML(os.path.join(project_dir, 'tiapp.xml'))
File "/Users/chaim/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/tiapp.py", line 52, in __init__
data = codecs.open(self.file,'r','utf-8','replace')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 881, in open
file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: 'android/tiapp.xml'
We need complete environment to diagnose this issue.
This is also happening for me in a standard install of 2.1.1.GA. In android/builder.py, the arguments being passed to \_\_main\_\_ are:
The "android" at position 2 comes from --platform=android. I didn't have time to track down why the wrong arguments are being sent to the builder script, so I modified my build.py at lines 2170-2171 to read:
This seems to do the trick for me.
Still happening in 2.1.3.GA; workaround still applies. New lines to replace are 2218-2219.
Same problem here. Titanium CLI is totally unusable because of this.
dupe
Able to reproduce this issue with the same error as in description. Testing environment: Mac OS X Lion 10.7.5 Titanium SDK, builds: 2.1.2.GA 2.1.3.GA 2.1.4.v20121030173408 3.0.0.v20121005014113
Note that Titanium Studio makes this call, which is successful:
Also note the documentation: https://wiki.appcelerator.org/display/guides2/Legacy+Command-Line+Interface Run a project on the Android Emulator: 'titanium.py run --platform=android'
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3453 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3454
Android emulator is being launched now through CLI. Environment used for verification - Titanium SDK: 3.1.0.v20130114171802 Titanium Studio:3.0.1.201212181159