[TIMOB-16215] CLI: Android: Show error and abort build if app name contains an ampersand
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-03-25T23:03:43.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | 2014 Sprint 03, 2014 Sprint 03 Core, Release 3.2.3, Release 3.3.0 |
Components | Android, CLI |
Labels | qe-closed-3.2.3, qe-testadded |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2014-01-17T01:54:45.000+0000 |
Updated | 2016-02-25T21:51:23.000+0000 |
Description
If you try to build an app that has an ampersand in the app name, then the build completes, but adb is unable to install the app to the emulator/device.
[INFO] Installing apk: /Users/chris/appc/workspace/testapp2/build/android/bin/testapp2 & blah.apk
[ERROR] Failed to install apk on "192.168.56.101:5555"
[ERROR] Error: INSTALL_FAILED_INVALID_URI
The solution is to simply disallow ampersands in the app name. When creating a new app, only allow ampersands in the name if Android is NOT selected, however do show an warning.
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5299 3.2.x pull request: https://github.com/appcelerator/titanium_mobile/pull/5300
Resolving again as this is the intended behavior.
Verified the fix with test Environment: Appc Studio:3.2.3.201403250634 Sdk:3.2.3.v20140325145222 alloy:1.3.1 titanium:3.2.3-dev titanium-code-processor:1.1.0 Osx: Maverick(10.9.2) Device:LG-P970(V4.0.4),IpodToch2(v7.1) Steps followed to test: Scenario 1: Tried creating new classic and alloy app having "&" in project name example(android&test) and target as android. Result: As expected was not able to create Project having "&" in project name. Scenario 2: However Tried creating new classic and alloy app having "&" in project name example(android&test) and target as ios. Result: As expected was able to successfully create and install app on ios device having "&" in project name. Scenario 3: Edited tiapp.xml and added target as android also on the above created app and tried running it on android device. Result: As expected Got the expected error as:
Scenario 4:Edited tiapp.xml and added target as android. Also added "ti config android.allowAppNameAmpersands true" in CLI. Then tried running it on android device. Result: Build was successful with message give below as warnings but still was not able to install apk on android device as expected.
Another solution (if ampersand is not in the name), is to delete from the Android device (or simulator) the previously installed version.