PDA

View Full Version : [FIXED] Native Android packaging fails on Sencha Cmd v3.0.0.181



cwelk
5 Oct 2012, 3:21 AM
When trying to package my Sencha Touch 2.1RC1 app for Android on Windows 7 (x64), I get the following Error Window "stbuild.exe doesn't work anymore":
39172

However packaging a native iOS app works.

Here's the command line output:

[INFO ] Packaging your application as a native app...
[ERROR] failed running native packager
[ERROR]
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
terminate called after throwing an instance of 'std::runtime_error'
what(): Type is not convertible to string


[ERROR] Exception running app build : JavaException: com.sencha.exceptions.ExBuild: failed running native packager
[ERROR]
[ERROR] BUILD FAILED
[ERROR] com.sencha.exceptions.BasicException: javax.script.ScriptException: JavaException: com.sencha.exceptions.ExBuild: failed running native packager in <Unknown source> at line number 709
[ERROR] at com.sencha.exceptions.BasicException.wrap(BasicException.java:43)
[ERROR] at com.sencha.cli.Command.dispatch(Command.java:104)
[ERROR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERROR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERROR] at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:184)
[ERROR] at com.sencha.ant.SenchaCommandTask.doExecute(SenchaCommandTask.java:59)
[ERROR] at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:21)
[ERROR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:601)
[ERROR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERROR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERROR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERROR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERROR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERROR] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[ERROR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERROR] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
[ERROR] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[ERROR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:601)
[ERROR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERROR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERROR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERROR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERROR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERROR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERROR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERROR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERROR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERROR] at com.sencha.ant.AntRunner.run(AntRunner.java:80)
[ERROR] at com.sencha.command.ant.AntCommand.execute(AntCommand.java:74)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:601)
[ERROR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERROR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERROR] at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:184)
[ERROR] at com.sencha.command.Sencha.main(Sencha.java:58)
[ERROR] Caused by: D:\sencha_cmd\Sencha\Cmd\3.0.0.181\plugins\touch\current\plugin.xml:271: javax.script.ScriptException: JavaException: com.sencha.exceptions.ExBuild: failed running native pa
ckager in <Unknown source> at line number 709
[ERROR] at org.apache.tools.ant.util.ReflectUtil.toBuildException(ReflectUtil.java:183)
[ERROR] at org.apache.tools.ant.util.ReflectUtil.throwBuildException(ReflectUtil.java:166)
[ERROR] at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:110)
[ERROR] at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
[ERROR] at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
[ERROR] at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
[ERROR] at org.apache.tools.ant.taskdefs.optional.script.ScriptDef.executeScript(ScriptDef.java:350)
[ERROR] at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:50)
[ERROR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERROR] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:601)
[ERROR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERROR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERROR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERROR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERROR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERROR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERROR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERROR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERROR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERROR] at com.sencha.ant.AntRunner.run(AntRunner.java:72)
[ERROR] at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:62)
[ERROR] at com.sencha.command.BasePluginCommands$BaseNamePathCommand.run(BasePluginCommands.java:102)
[ERROR] at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:96)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:601)
[ERROR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERROR] ... 43 more
[ERROR] Caused by: javax.script.ScriptException: JavaException: com.sencha.exceptions.ExBuild: failed running native packager in <Unknown source> at line number 709
[ERROR] at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:220)
[ERROR] at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:236)
[ERROR] at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:601)
[ERROR] at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108)
[ERROR] ... 70 more
[ERROR] Caused by: sun.org.mozilla.javascript.internal.JavaScriptException: JavaException: com.sencha.exceptions.ExBuild: failed running native packager (<Unknown source>#709)
[ERROR] at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Interpreter.java:1071)
[ERROR] at sun.org.mozilla.javascript.internal.Interpreter.interpret(Interpreter.java:854)
[ERROR] at sun.org.mozilla.javascript.internal.InterpretedFunction.call(InterpretedFunction.java:164)
[ERROR] at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(ContextFactory.java:429)
[ERROR] at com.sun.script.javascript.RhinoScriptEngine$1.superDoTopCall(RhinoScriptEngine.java:116)
[ERROR] at com.sun.script.javascript.RhinoScriptEngine$1.doTopCall(RhinoScriptEngine.java:109)
[ERROR] at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(ScriptRuntime.java:3163)
[ERROR] at sun.org.mozilla.javascript.internal.InterpretedFunction.exec(InterpretedFunction.java:175)
[ERROR] at sun.org.mozilla.javascript.internal.Context.evaluateReader(Context.java:1159)
[ERROR] at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:210)
[ERROR] ... 77 more
[ERROR]
[ERROR] Total time: 1 minute 16 seconds
[ERROR]
[ERROR] The following error occurred while executing this line:
D:\xampp\htdocs\game\mobile-app\.sencha\app\build-impl.xml:93: com.sencha.exceptions.BasicException: javax.script.ScriptException: JavaException: com.sencha.exceptions.ExBuild: failed runnin
g native packager in <Unknown source> at line number 709

cwelk
5 Oct 2012, 4:06 AM
One more thing:

I first had to change "androidAPILevel":"15", to "androidAPILevel":15, in order to get by the following error:

"Attribute minSdkVersion in AndroidManifest.xml must be an Integer!"

dongryphon
5 Oct 2012, 10:02 PM
Thanks for the report! I have opened a bug in our bug tracker.

dongryphon
31 Oct 2012, 9:32 AM
I talked to the developer working on the mobile packager and he was unable to reproduce this issue. Have you tried in the latest Cmd build? (http://www.sencha.com/products/sencha-cmd)

Where do you see the androidAPILevel problem show up?

If you are still having this problem, could you run "sencha -debug ..." with and without that change and post the logs?

Thanks.

cwelk
2 Nov 2012, 3:06 AM
With the current Sencha CMD 3.0.0.230 I no longer can produce my reported errror. (I also upgraded my JDK to SE 7u9)

Android packaging now works, and the androidAPILevel config as a string doesn't give an error anymore.

svenna
2 Nov 2012, 3:30 AM
Have you tried uploading to Google Play, and installing on the Device? Does the installation work?

cwelk
2 Nov 2012, 5:45 AM
Direct Installation on Galaxy Nexus (Android 4.1.2) worked. (haven't tried google play)

svenna
2 Nov 2012, 5:47 AM
With Debug or Release setting?

Direct install with Debug is working for me, but Release is not. Google Play accepts the Release cert, but the device does not after downloading from Play.

dongryphon
2 Nov 2012, 11:17 AM
I am closing this ticket because the OP is fixed.

@svenna - are there other threads/reports for the issue you are describing? Thx :)

svenna
2 Nov 2012, 11:47 AM
http://www.sencha.com/forum/showthread.php?247408-CMD3-Signing-Android-Package-Accepted-by-Play-Store-but-not-by-Phone

dongryphon
2 Nov 2012, 3:04 PM
Thanks - I knew that looked familiar. :)