Results 1 to 2 of 2

Thread: Cannot run packaged Android app - Ext.logger

  1. #1
    Sencha User
    Join Date
    Sep 2013
    Posts
    14

    Default Cannot run packaged Android app - Ext.logger

    Sencha Cmd version(s) tested:


    • Sencha Cmd 3.1.2.342

    Operating System


    • Win7 Pro


    Framework used:

    • Sencha Touch 2.2.1
    • Cordova 2.2


    Description:


    • I have an application that has been built with Sencha Architect 2.2.2.991 which I am trying to package as an Android app. While I can get the apk built, the app just produces a white screen on a real device (Galaxy SIII). If I run the code on a local webserver, it shows that the Ext.logger is undefined. I have found a lot of people reporting this problem but so far none of their solutions have worked.



    This is a project that I have inherited and while I'm familiar with the framework, I'm still finding my way around all the requirements/configs to get this packaged.

    The common solution proposed is to add the following to the app.json file:

    Code:
        /**
         * Build options
         */
        "buildOptions": {
        "product": "touch",
        "minVersion": 3,
        "debug": false,
        "logger": false
       },
    However, if I do that I get the following error:

    Code:
    [DBG] Load url is file:/C:/Users/ZZZZ/bin/Sencha/Cmd/3.1.2.342/lib/yuicompressor-2.4.7.jar
    [ERR] C2000: Rhino Parse Error (missing } after function body => }, function() {) -- unknown-file:24673
    [ERR] C2000: Rhino Parse Error (Compilation produced 1 syntax errors. => null) -- unknown-file:1
    [ERR] The following error occurred while executing this line:
    C:\Mobile\.sencha\app\build-impl.xml:165: The following error occurred while executing this line:
    C:\Mobile\.sencha\app\build-impl.xml:158: com.sencha.exceptions.ExScript: Wrapped com.sencha.exceptions.ExBuild: Failed to com
    press input (x-app-build#341)
       isJavaCollection (C:\Users\ZZZZ\bin\Sencha\Cmd\3.1.2.342\ant\ant-util.js:183)
       toJS (C:\Users\ZZZZ\bin\Sencha\Cmd\3.1.2.342\ant\ant-util.js:241)
       runAppBuild (x-app-build:9)
       [anonymous] (x-app-build:571)
       x_app_build (x-app-build:569)
       <script> (anonymous:1)
         at com.sencha.exceptions.BasicException.wrap(BasicException.java:44)
         at com.sencha.cli.Command.dispatch(Command.java:64)
         at com.sencha.cli.Commands.dispatch(Commands.java:62)
         at com.sencha.cli.Commands.dispatch(Commands.java:62)
         at com.sencha.command.Sencha.dispatch(Sencha.java:78)
         at com.sencha.command.Sencha.main(Sencha.java:141)
       Caused by: The following error occurred while executing this line:
    C:\Mobile\.sencha\app\build-impl.xml:165: The following error occurred while executing this line:
    C:\Mobile\.sencha\app\build-impl.xml:158: com.sencha.exceptions.ExScript: Wrapped com.sencha.exceptions.ExBuild: Failed to com
    press input (x-app-build#341)
       isJavaCollection (C:\Users\ZZZZ\bin\Sencha\Cmd\3.1.2.342\ant\ant-util.js:183)
       toJS (C:\Users\ZZZZ\bin\Sencha\Cmd\3.1.2.342\ant\ant-util.js:241)
       runAppBuild (x-app-build:9)
       [anonymous] (x-app-build:571)
       x_app_build (x-app-build:569)
       <script> (anonymous:1)
         at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
         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.AntScript.execute(AntScript.java:127)
         at com.sencha.command.plugin.PluginManager.execute(PluginManager.java:93)
         at com.sencha.command.plugin.PluginManager.executeReverseFirst(PluginManager.java:134)
         at com.sencha.command.environment.BuildEnvironment.execute(BuildEnvironment.java:66)
         at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:23)
         at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:120)
         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.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:174)
         at com.sencha.cli.Command.dispatch(Command.java:42)
         at com.sencha.cli.Commands.dispatch(Commands.java:62)
         at com.sencha.cli.Commands.dispatch(Commands.java:62)
         at com.sencha.command.Sencha.dispatch(Sencha.java:78)
         at com.sencha.command.Sencha.main(Sencha.java:141)
    As all the other issue reports specifically mention the logger setting, I reduced this block to:

    Code:
        /**
         * Build options
         */
        "buildOptions": {
        "logger": false
       },
    This proceeds to build the apk, but then still fails to run. I have tried various settings for this flag along with sencha-touch-debug.js vs sencha-touch.js but so far nothing seems to work.

    Any suggestions will be greatly appreciated.

    Thx.

  2. #2
    Sencha User
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165

    Default

    Touch 2.3 and Cmd 4 were released today. You might try with those updates to see if you still see the issue.

    http://www.sencha.com/products/touch/download/
    http://www.sencha.com/products/sencha-cmd/download

    *notes on upgrading the app:
    http://docs.sencha.com/extjs/4.2.2/#...ha-app-upgrade

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •