Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4868] Building from CLI for Android device throws 'Failed to package application' error

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2017-03-27T18:38:23.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelstitanium-cli
ReporterUriel Arvizu
AssigneeShak Hossain
Created2017-03-21T18:53:12.000+0000
Updated2017-03-27T18:38:23.000+0000

Description

I'm trying to build an Alloy test project using the CLI. I followed the instructions from [here](http://docs.appcelerator.com/platform/latest/#!/guide/Setting_up_the_Titanium_CLI). But whenever I run the command {quote}ti build -p android -T device{quote} I get the following error as it's finishing to try and generate the APK: {quote}[INFO] Generating C:\Titanium\workspace\AppTest4\build\android\res\values\theme.xml [INFO] Packaging application: c:\Android\SDK\build-tools\24.0.0\aapt.exe "package" "-f" "-m" "-J" "C:\Titanium\workspace\AppTest4\build\android\gen" "-M" "C:\Titanium\workspace\AppTest4\build\android\AndroidManifest.xml" "-A" "C:\Titanium\workspace\AppTest4\build\android\bin\assets" "-S" "C:\Titanium\workspace\AppTest4\build\android\res" "-I" "c:\Android\SDK\platforms\android-23\android.jar" "-F" "C:\Titanium\workspace\AppTest4\build\android\bin\app.ap_" "--auto-add-overlay" "--extra-packages" "ti.modules.titanium.ui:android.support.v7.appcompat:android.support.v7.cardview" "-S" "C:\Users\AGUSTN~1\AppData\Local\Temp\117222-4892-jevz47/res" "-S" "C:\Users\AGUSTN~1\AppData\Local\Temp\117222-4892-1b4s1oy/res" "-S" "C:\Users\AGUSTN~1\AppData\Local\Temp\117222-4892-1ik5kyr/res" [ERROR] Failed to package application: [ERROR] [ERROR]{quote} The full build log can be found in my attachments. I have tried creating sample projects using Titanium SDK 6.0.2.GA, 6.0.1.GA and 5.5.1.GA, but none have been successful at generating the APK. The way I generate the projects from CLI is using the following commands: {quote}ti create --id com.mycompany.myapp -d . -n APPNAME -p android -t app -u http://mycompany.com cd APPNAME/ alloy new {quote} Are there any know causes for this issue? I attach the log from the command 'appc ti info -p android' when run with Titanium SDK 6.0.2.GA, 6.0.1.GA and 5.5.2.GA selected.

Attachments

FileDateSize
appc_log_5.5.2.GA.txt2017-03-22T23:31:26.000+00001825
appc_log_6.0.1.GA.txt2017-03-22T23:31:26.000+000019364
appc_log_6.0.2.GA.txt2017-03-22T23:31:26.000+000018712
build_log.txt2017-03-22T22:57:51.000+000026486

Comments

  1. Sharif AbuDarda 2017-03-21

    Hello, Use the new release SDK 6.0.2.GA. You are using an old SDK. Thanks.
  2. Uriel Arvizu 2017-03-21

    Ok, I managed to get the latest SDK, created another test project and this time it fails when packaging the application, it throws the following: {quote}[INFO] Generating C:\Titanium\workspace\TestApp\build\android\res\values\theme.xml [INFO] Packaging application: c:\Android\SDK\build-tools\24.0.0\aapt.exe "package" "-f" "-m" "-J" "C:\Titanium\workspace\TestApp\build\android\gen" "-M" "C:\Titanium\workspace\TestApp\build\android\AndroidManifest.xml" "-A" "C:\Titanium\workspace\TestApp\build\android\bin\assets" "-S" "C:\Titanium\workspace\TestApp\build\android\res" "-I" "c:\Android\SDK\platforms\android-23\android.jar" "-F" "C:\Titanium\workspace\TestApp\build\android\bin\app.ap_" "--auto-add-overlay" "--extra-packages" "ti.modules.titanium.ui:android.support.v7.appcompat:android.support.v7.cardview" "-S" "C:\Users\AGUSTN~1\AppData\Local\Temp\117221-11972-1i8hc6e/res" "-S" "C:\Users\AGUSTN~1\AppData\Local\Temp\117221-11972-11ri86m/res" "-S" "C:\Users\AGUSTN~1\AppData\Local\Temp\117221-11972-1kv5ato/res" [ERROR] Failed to package application: [ERROR] [ERROR]{quote}
  3. Sharif AbuDarda 2017-03-22

    Hello, Attach the log of "appc ti info -p android" as a text file in this ticket. Thanks.
  4. Uriel Arvizu 2017-03-22

    I have attached the log with the contents you requested. Thanks.
  5. Sharif AbuDarda 2017-03-23

    Hello, You should follow this link here http://docs.appcelerator.com/platform/latest/#!/guide/Appcelerator_CLI_Tasks. You are using our old Titanium CLI for development. We are now Appcelerator. Also, Use the studio for development. Follow: http://docs.appcelerator.com/platform/latest/#!/guide/Quick_Start. Thanks.
  6. Uriel Arvizu 2017-03-23

    In that case you can close this as solved. Thanks

JSON Source