Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-10072

Android: CLI won't launch Android Emulator

    Details

      Description

      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'
      

        Activity

        Hide
        Tamila Smolich (Inactive) added a comment -

        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

        Show
        Tamila Smolich (Inactive) added a comment - 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
        Hide
        Dustin Hyde added a comment -

        Note that Titanium Studio makes this call, which is successful:

        "/usr/bin/python" "/Users/dhyde/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121107151610/android/builder.py" "emulator" "Project" "/Users/dhyde/Desktop/android/android-sdk-macosx" "/Users/dhyde/Desktop/TISTUD-RC/workspace/Project" "com.appcelerator.project" "4" "WVGA854" "armeabi" ""
        
        Show
        Dustin Hyde added a comment - Note that Titanium Studio makes this call, which is successful: "/usr/bin/python" "/Users/dhyde/Library/Application Support/Titanium/mobilesdk/osx/3.0.0.v20121107151610/android/builder.py" "emulator" "Project" "/Users/dhyde/Desktop/android/android-sdk-macosx" "/Users/dhyde/Desktop/TISTUD-RC/workspace/Project" "com.appcelerator.project" "4" "WVGA854" "armeabi" ""
        Hide
        Dustin Hyde added a comment -

        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'

        Show
        Dustin Hyde added a comment - 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'
        Show
        Chris Barber added a comment - Master pull request: https://github.com/appcelerator/titanium_mobile/pull/3453 3.0.x pull request: https://github.com/appcelerator/titanium_mobile/pull/3454
        Hide
        Shyam Bhadauria added a comment -

        Android emulator is being launched now through CLI.
        Environment used for verification -
        Titanium SDK: 3.1.0.v20130114171802
        Titanium  Studio:3.0.1.201212181159

        Show
        Shyam Bhadauria added a comment - Android emulator is being launched now through CLI. Environment used for verification - Titanium SDK: 3.1.0.v20130114171802 Titanium  Studio:3.0.1.201212181159

          People

          • Assignee:
            Chris Barber
            Reporter:
            Chaim Krause
          • Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development