Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5393] Tooling: Win 7 or XP space in path to SD card causes Android emulator r13 fail to launch from Studio

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-12-22T12:38:23.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sRelease 1.8.0.1, Sprint 2011-51, Release 2.0.0, Release 1.8.1
ComponentsTooling
Labelsdr-list
ReporterEric Merriman
AssigneeDon Thorp
Created2011-09-29T17:29:33.000+0000
Updated2017-03-14T05:07:51.000+0000

Description

Description:

Since Google released r13 tooling which includes a fix for the "space in the path" issue introduced with r12, we updated our XP and Win 7 test systems to the new SDK. Attempting to launch the emulator with studio fails with the following console output:
[DEBUG] SDCard: C:\Users\Joe Tester\.titanium\android2.sdcard
[DEBUG] AVD ID: 21
[DEBUG] AVD Skin: WVGA800
[DEBUG] SDK: C:\android-sdk
[DEBUG] C:\android-sdk\platform-tools\adb.exe start-server
[INFO] Creating 64M SD card for use in Android emulator
[DEBUG] C:\android-sdk\tools\mksdcard.exe 64M "C:\Users\Joe Tester\.titanium\titanium_21_WVGA800.sdcard"
[INFO] Creating new Android Virtual Device (21 WVGA800)
[DEBUG] C:\android-sdk\tools\emulator.exe -avd titanium_21_WVGA800 -port 5560 -sdcard C:\Users\Joe Tester\.titanium\titanium_21_WVGA800.sdcard -logcat *:d,* -no-boot-anim -partition-size 128
invalid command-line parameter: Tester\.titanium\titanium_21_WVGA800.sdcard.
Hint: use '@foo' to launch a virtual device named 'foo'.
please use -help for more information
[DEBUG] signal caught: 3
[DEBUG] calling emulator kill on 2544
ERROR: The process "2544" not found.
As you can see, the text after the space is treated as an invalid parameter. We were hoping the change to the Android SDK would resolve this problem, but it doesn't seem to have made a difference.

Steps to reproduce:

Install Android SDK r13 on Windows 7 or XP

Ensure your user account has a space in the Name on Win 7

#* If on XP, the path should include "Documents and Settings" regardless of user account

Create a new project in Titanium Studio

Attempt to run the project in the emulator

Result:

Emulator fails to launch

Expected:

Emulator launches

Comments

  1. Paul Dowsett 2011-11-23

    This is an Android SDK issue, documented as [Issue 18317: Emulator in R12 doesn't properly invoke emulator-arm.exe if the install path or any parameter has a space in it](https://code.google.com/p/android/issues/detail?id=18317). Workaround is to use windows short 8dot3 filenames, for example: || Real Path || Path using 8dot3 names || | C:\Program Files | C:\PROGRA~1\ | | C:\Program Files (x86)\ | C:\PROGRA~2\ | | C:\Users\Joe Tester\ | C:\Users\JOETES~1 | To test these, copy and paste one into the Start button > "Run" / "Search programs and files" box. To find 8dot3 names, at the command prompt run:
       dir /x
       
  2. Paul Dowsett 2011-12-02

    Please also see this related discussion: [Titanium install on Windows XP SP3 gives me a serious headache](http://developer.appcelerator.com/devlink/profile/473051/paul-dowsett)
  3. Eric Merriman 2011-12-08

    This is being caused by the form of line 420 in builder.py. The location of the SDcard for the emulator is placed in "Documents and settings" by default. Currently it is:
    self.sdcard,
    When set to the following, it works. The impact of changing this for other platforms is unknown.
    '"'+self.sdcard+'"',
  4. Paul Dowsett 2011-12-18

    [This thread](http://developer.appcelerator.com/question/124530/how-do-i-manually-set-the-sdcard-path-for-the-android-emulator-error-invalid-command-line-parameter-and) supports Eric's solution.
  5. Paul Dowsett 2011-12-19

    Functional test results below show that ayeung's fix works as expected on Windows 7:
       Win 7 > Fails - Titanium SDK version: 1.7.5 (11/02/11 17:00 ab20af7)
       Win 7 > Succeeds - Titanium 1.8.0.1 (2011/12/19 17:28 91230d6)
       Win 7 > Succeeds - Titanium 1.9.0 (2011/12/19 17:01 78ed274)
       
    Note, this has not been tested on osx or ubuntu.
  6. Eric Merriman 2011-12-21

    Reopening. While existing emulators previously created are working, new emulators can't be created with Win7, will verify on XP. This occurs with SDK: 1.8.0.1.v20111220190134.
  7. Eric Merriman 2011-12-21

    When cleaning out all existing emulators and then trying to use studio to create a new one, this is returned on XP: [ERROR] Could not create file '"C:\Documents and Settings\Administrator\.titanium\titanium_26_WVGA854.sdcard"': Invalid argument Error: '"C:\Documents and Settings\Administrator\.titanium\titanium_26_WVGA854.sdcard"' is not recognized as a valid sdcard value. Value should be: 1. path to an sdcard. 2. size of the sdcard to create: [K|M] This is returned on Win 7: [ERROR] Could not create file '"C:\Users\labuser\.titanium\titanium_14_WVGA854.sdcard"': Invalid argument Error: '"C:\Users\labuser\.titanium\titanium_14_WVGA854.sdcard"' is not recognized as a valid sdcard value. Value should be: 1. path to an sdcard. 2. size of the sdcard to create: [K|M]
  8. Lee Morris 2017-03-14

    Closing ticket as fixed.

JSON Source