[TIMOB-16015] CLI: Android build fails if app icon is not named "appicon.png"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-12-18T00:11:38.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | 2013 Sprint 26, 2013 Sprint 26 Core, Release 3.2.0, Release 3.3.0 |
Components | Android, CLI |
Labels | cli, qe-testadded |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2013-12-17T21:57:37.000+0000 |
Updated | 2014-01-23T10:39:07.000+0000 |
Description
There is a bug where if the app icon is not named "appicon.png", the build fails with the following error:
[INFO] Packaging application: /opt/android-sdk/build-tools/19.0.0/aapt "package" "-f" "-m" "-J" "/Users/chris/appc/workspace/testapp2/build/android/gen" "-M" "/Users/chris/appc/workspace/testapp2/build/android/AndroidManifest.xml" "-A" "/Users/chris/appc/workspace/testapp2/build/android/bin/assets" "-S" "/Users/chris/appc/workspace/testapp2/build/android/res" "-I" "/opt/android-sdk/platforms/android-14/android.jar" "-I" "/Users/chris/Library/Application Support/Titanium/mobilesdk/osx/3.2.0/android/titanium.jar" "-F" "/Users/chris/appc/workspace/testapp2/build/android/bin/app.ap_"
[ERROR] Failed to package application:
[ERROR]
[ERROR] /Users/chris/appc/workspace/testapp2/build/android/AndroidManifest.xml:4: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/appicon').
Nadav original found this bug and reported it here: http://www.appcelerator.com/blog/2013/12/3-2-0-rc-of-sdkstudio-now-available/.
{quote}
Nadav Hoze
Posted December 14, 2013 @ 12:52 pm
Actually I downloaded the new version of Studio and now it works fine.
But now my project fails to build.
It says Error: No resource found that matches the given name (at 'icon' with value '@drawable/appicon' event though I do not use appicon and my own icon in the tiapp.xml
I changed the name to appicon and it works fine. but now the icons is titanium default.
{quote}
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5136 3.2.x pull request: https://github.com/appcelerator/titanium_mobile/pull/5137
Test steps: 1. Create a new titanium project 2. Rename Resources/android/appicon.png to Resources/android/myappicon.png 3. Change the appicon.png in tiapp.xml to myappicon.png 4. Build project Expected: The project should build without any errors Actual: The project builds with the error mentioned in the original description
Verified the fix & the app does not error out & fail if the app icon is named anything other than "appicon.png". App builds successfully. Closing. Environment: Appcel Studio : 3.2.0.201312162210 Ti SDK : 3.2.0.v20131217161652 Mac OSX : 10.8.5 Alloy : 1.3.0-cr2 CLI - 3.2.0-cr3 Nexus 5 - android 4.4
Verified the fix with : OSX: 10.8.5 Xcode: 5.0 Appcelerator Studio:3.2.0.201312171913 SDK:3.2.0.v20131217190633 alloy: 1.3.0-cr2 acs: 1.0.10 npm: 1.3.2 titanium: 3.2.0-cr3 titanium-code-processor: 1.1.0-cr2 Device: Nexus 7 (v4.3) App builds and launches successfully.