Reputation: 6466
I'm trying to package my Sencha Touch 2 based mobile application for Android. Followed the steps mentioned at the Sencha documentation, always getting some different errors.
None of these commands works: (added errors below of each command)
$ sencha package build packager.json
[ERR] Command must be run from a package folder
$ sencha package run packager.json
[ERR] Unknown command: "run"
$ sencha package packager.json
[ERR] Unknown command: "packager.json"
After I googled this situation; found an answer that says valid command is:
$ sencha app package build packager.json
Getting these errors:
Copy operation failed src=st-res/android//nimblekit.jar dst=build///libs/nimblekit.jar
Can not open source file
Failed to copy packager library
Failed to package application
Environment & Tool Details:
OS : Linux
Sencha Touch version : 2.2.1
Sencha Cmd version : 3.1.2.342
Upvotes: 1
Views: 1986
Reputation: 19
Sencha.cfg is created by Sencha Cmd, so:
did you generate the app by Sencha Cmd: sencha generate app? If not rename your app folder. Create the app with Sencha Cmd and copyright the content from the renamed folder to the created folder. Then try again.
Upvotes: 0
Reputation: 131
Following are steps to create Sencha android build:
Create certificate using keytool command for signing android application:
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
it will create keystore for you.
Open 'packager.json' file & make following changes:
Copy 'st-res' folder from your sencha cmd directory(for linux: /home/bin/Sencha/Cmd/ur-version-name/stbuild) to your project directory.
then run command:
sencha app build native
It will create .apk file to output folder which you have set in 'packager.json' file.
Hope this will help you. But my opinion is you use Phonegap for packaging the app. You can build app using Sencha touch & just use Phonegap to deploy app to android or iOS.
Upvotes: 2