Hello,
I'm trying to figure out how to make an Android APK that is fully polished and ready for Google Play. I have an app with the following structure:
Code:
- web
+ app
+ resources
+ touch (sdk)
app.js
app.json
build.xml
index.html
packager.json
My packager.json file looks like this:
Code:
{
"applicationName":"My App Name",
"applicationId":"my.package",
"versionString":"1.0",
"versionCode":"1",
"icon": {
"57":"resources/icons/icon.png",
"72":"resources/icons/icon-ipad.png",
"114":"resources/icons/iconX2.png",
"144":"resources/icons/icon-ipadX2.png"
},
"inputPath":"./",
"outputPath":"../build/",
"configuration":"Release",
"platform":"Android",
"certificatePath":"../mycert.keystore",
"certificatePassword":"mypass",
"provisionProfile":"",
"sdkPath":"c:\\Progra~2\\Android\\android-sdk",
"androidAPILevel":"9",
"permissions":[
"INTERNET",
"ACCESS_NETWORK_STATE"
],
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]
}
I am running Sencha Cmd v3.0.2.288 on Windows 7 64-bit.
In a command prompt, I cd to the web folder and run:
Code:
sencha app package run packager.json
This seems to correctly build an APK file and put it into the build folder. However, the APK is 5MB, and opening the archive shows that the app has not been minified and packaged into a single app-all.js file, as I would expect.
My question is: What step am I missing to get my code build/packaged/minified before the APK packaging occurs?
I have tried this:
Code:
> cd touch
>sencha -debug app buildSencha Cmd v3.0.2.288
[ERR] The application was last modified by an older version of Sencha CMD (0.0.0.0). Please run 'sencha app upgrade -noframework' to update.
[ERR] Application cmd version incompatible with this one.
com.sencha.exceptions.ExBuild: Application cmd version incompatible with this one.
at com.sencha.command.app.AppCommands$BuildCommand.validateCurrentConfig(AppCommands.java:144)
at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:89)
at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:98)
at com.sencha.command.BasePluginCommands$BaseNamePathCommand.run(BasePluginCommands.java:142)
at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sencha.cli.Command.dispatch(Command.java:78)
at com.sencha.cli.Commands.dispatch(Commands.java:49)
at com.sencha.cli.Commands.dispatch(Commands.java:49)
at com.sencha.command.Sencha.main(Sencha.java:71)
Naturally, my next step was:
Code:
>sencha -debug app upgrade -noframework
Sencha Cmd v3.0.2.288
[ERR] null
com.sencha.exceptions.BasicException
at com.sencha.exceptions.BasicException.wrap(BasicException.java:43)
at com.sencha.cli.Command.dispatch(Command.java:104)
at com.sencha.cli.Commands.dispatch(Commands.java:49)
at com.sencha.cli.Commands.dispatch(Commands.java:49)
at com.sencha.command.Sencha.main(Sencha.java:71)
Caused by: java.lang.NullPointerException
at com.sencha.command.app.AppCommands$UpgradeCommand.execute(AppCommands.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sencha.cli.Command.dispatch(Command.java:78)
... 3 more
My last-ditch effort was this:
Code:
>sencha -debug app upgrade ../
Sencha Cmd v3.0.2.288
[DBG] Loading configuration for target framework directory c:\project\web\touch\..
[DBG] found sencha.cfg at C:\sencha\Sencha\Cmd\3.0.2.288
[DBG] Checking for framework config overrides
[DBG] checking null for plugin.xml
[DBG] checking null for plugin.xml
[DBG] checking null for plugin.xml
[DBG] checking C:\sencha\Sencha\Cmd\3.0.2.288 for plugin.xml
[DBG] located plugin C:\sencha\Sencha\Cmd\3.0.2.288\plugin.xml
[INF]
[INF] init-properties:
[INF]
[INF] init-sencha-command:
[INF]
[INF] init:
[INF]
[INF] -before-app-upgrade:
[INF]
[INF] app-upgrade-impl:
[ERR] This is the default implementation from Sencha CMD and must be overriden by the framework. com.sencha.exceptions.BasicException: This is the default implementation from Sencha CMD and must be overriden by the framework.
at com.sencha.exceptions.BasicException.wrap(BasicException.java:43)
at com.sencha.cli.Command.dispatch(Command.java:104)
at com.sencha.cli.Commands.dispatch(Commands.java:49)
at com.sencha.cli.Commands.dispatch(Commands.java:49)
at com.sencha.command.Sencha.main(Sencha.java:71)
Caused by: C:\sencha\Sencha\Cmd\3.0.2.288\plugin.xml:131: This is the default implementation from Sencha CMD and must be overriden by the framework.
at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:164)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at com.sencha.ant.AntRunner.run(AntRunner.java:156)
at com.sencha.ant.AntRunner.run(AntRunner.java:72)
at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:94)
at com.sencha.command.app.AppCommands$UpgradeCommand.execute(AppCommands.java:234)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sencha.cli.Command.dispatch(Command.java:78)
... 3 more
Can someone please help? Thanks.