[TIMOB-2527] Android: App launch/build problem if ampersand in home folder name (windows)

GitHub Issuen/a
Resolution Date2013-11-14T18:01:07.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 18 Core, 2013 Sprint 18, Release 3.2.0
ComponentsAndroid, Tooling
Labelsandroid, androidbuild, cb-verified, qe-closed-3.2.0, windows
ReporterBill Dawson
AssigneeChris Barber


http://developer.appcelerator.com/question/86611/ampersand-in-user-path-prevents-creation-of-avd-windows-vista The user folder (C:\users...) for my profile contains an ampersand (C:\users\tom&jerry\ - real names hidden). This is preventing Titanium from creating the Android AVDs needed to test apps, giving the following error: [TRACE] Error: 'C:\Users\tom' is not recognized as a valid sdcard value. It looks like the command that creates the avd is stripping away part of the string when it tries to create an avd. I've manage to track down a function 'create_avd' in 1.4.0/android/builder.py which I think may be the culprit, but I'm not sure where to go from there. The sdcard has been created, so the problem must be after that point. There are a multitude of methods for renaming the user folder, none of which are straight forward (registry edits, etc.). I'm hoping someone can tell me a way of making Titanium function with this, albeit rare and idiotic, usage case. Does anyone have any suggestions?


  1. Bill Dawson 2011-04-15 I'm afraid this appears to be pretty deep, inside android's own tools. There is no quick fix that I can find, so we're going to have to fob it off to a later release. Sorry.
  2. Chris Barber 2013-09-06 titanium_mobile pull request: https://github.com/appcelerator/titanium_mobile/pull/4646 node-appc pull request: https://github.com/appcelerator/node-appc/pull/55 To test: 0) find a Windows computer 1) "ti sdk select" the 3.2 sdk 2) update the lib/subprocess.js in the Titanium SDK's node_modules/node-appc/lib directory 3) move the android sdk into a subdirectory containing an ampersand (i.e. C:\my&test\android-sdk) 4) update the android sdk location (ti config android.sdkPath C:\my&test\android-sdk) 5) run "ti info" and examine the Android issues
  3. Samuel Dowse 2013-11-12 Verified NOT fixed on: Windows 7 Titanium SDK, build: CLI: 3.2.0 Android SDK and NDK saved in C:\Users\tester\Desktop\AndroidNDK&SDK\ Running 'adb' in terminal finds the folder and the executable inside the SDK folder. Running 'android' in terminal does not find the folder. +Extra Information+ C:\Users\tester>android The system cannot find the path specified. The system cannot find the path specified. 'SDK\Android_SDK\tools\' is not recognized as an internal or external command, operable program or batch file. The system cannot find the path specified.
  4. Samuel Dowse 2013-12-17 Verified fixed on: Mac OSX 10.9 Mavericks Titanium Studio, build: Titanium SDK, build: 3.2.0.v20131216191854 CLI: 3.2.0-cr3 Alloy: 1.3.0-cr Verified with [~cbarber] The reason for this is on Androids side. An ampersand cannot be used in the path to the Android SDK. Titanium CLI has added features in "ti info" that will notify the user of this and request the SDK be placed in a location without an ampersand in the path. Closing.

JSON Source