Results 1 to 3 of 3

Thread: Unaltered app generated with Sencha CMD fail to load in Android as an APK

  1. #1

    Default Unaltered app generated with Sencha CMD fail to load in Android as an APK


    Sencha Cmd version(s) tested:

    • Sencha Cmd v4.0.3.74
    Operating System:
    • Win8.1 Pro
    Framework used:
    • Sencha Touch 2.3.1
    • Android emulator and Android phone fail to load an APK of an unaltered application generated with the command "sencha generate app"
    Diagnostic Output:
    C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3>sencha diag show
    Sencha Cmd v4.0.3.74
    [INF]                          app.archivePath : archive
    [INF]                   : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3/build/FoodInspector
    [INF]                            app.classpath : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3/app.js,C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3/app
    [INF]                          app.cmd.version :
    [INF]                           app.config.dir : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3\.sencha\app
    [INF]                                  app.dir : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3
    [INF]                            app.framework : touch
    [INF]                    app.framework.version :
    [INF]                          : f0dc20fd-d337-4f63-aa5c-dc9d25dddb63
    [INF]                        app.indexHtmlPath : index.html
    [INF]                        : FoodInspector
    [INF]                       app.requires.names :
    [INF]                    app.requires.packages :
    [INF]                       app.resource.paths :
    [INF]                     buildenvironment.dir : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3
    [INF]                buildenvironment.load.dir : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3
    [INF]                           cmd.config.dir : C:\Users\francois\bin\Sencha\Cmd\
    [INF]                                  cmd.dir : C:\Users\francois\bin\Sencha\Cmd\
    [INF]                     cmd.framework.minver : 2.2.0
    [INF]                    cmd.framework.version :
    [INF]                             cmd.jvm.args : -Xms128m -Xmx1024m -Djava.awt.headless=true
    [INF]               cmd.merge.tool.args.araxis : -wait -merge -3 -a1 {base} {user} {generated} {out}
    [INF]               cmd.merge.tool.args.kdiff3 : {base} {user} {generated} -o {out}
    [INF]              cmd.merge.tool.args.p4merge : {base} {user} {generated} {out}
    [INF]            cmd.merge.tool.args.smartsync : {user} {generated} {base}
    [INF]           cmd.merge.tool.args.sourcegear : --merge --result={out} {user} {base} {generated}
    [INF]             cmd.merge.tool.args.tortoise : -base:{base} -theirs:{generated} -mine:{user} -merged:{out}
    [INF]                               cmd.minver :
    [INF]                             cmd.platform : windows
    [INF]                          cmd.server.port : 1841
    [INF]                              cmd.version :
    [INF]                             cmd.web.port : 1841
    [INF]                      framework.classpath : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3\touch/src
    [INF]                     framework.cmd.minver :
    [INF]                    framework.cmd.version :
    [INF]                     framework.config.dir : C:\Users\francois\bin\Sencha\Cmd\\plugins\touch\2.3
    [INF]                            framework.dir : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3\touch
    [INF]                        framework.ignores : src/locale,src/platform,auth2/Auth.js,scroller/Infinite.js
    [INF]                  : touch
    [INF]                   framework.packages.dir : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3\touch/packages
    [INF]                        framework.version :
    [INF]                           repo.local.dir : C:\Users\francois\bin\Sencha\Cmd\repo
    [INF] : true
    [INF]                                touch.dir : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3/touch
    [INF]             : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3/build
    [INF]                    workspace.cmd.version :
    [INF]                     workspace.config.dir : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3\.sencha\workspace
    [INF]                            workspace.dir : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3
    [INF]                   workspace.packages.dir : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3/packages
    [INF]                      workspace.theme.dir : C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\GS3/packages/${args.themeName}

    Steps to reproduce the problem:
    sencha generate app MyApp ../MyApp
    //Testing the app in Chrome and it is working
    sencha app package generate buildConfig.json
    //Editing the config file
    sencha app package build buildConfig.json
    //Installing the APK on an Android device
    "C:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools\adb.exe" install -r C:\Users\francois\Documents\Aptana Studio 3 Workspace\resto\build\MyApp.apk"
    I tested the generated app with my Chrome browser on Windows 8.1 and the app is working.
    I did not modify the app generated with "sencha generate app MyApp ../MyApp"
    When running the app with an emulator or with a phone the app is freezing on the loading screen. (the blue screen with the dotes).

    Debugging already done:

    I tried with androidAPILevel 8 and 17.
    When using remote debbuging (, the only error message I get on the console is "undefined:undefined".

    Here is a copy of my buildConfig.json
         * @cfg {String} applicationName
         * @required
         * This is the name of your application, which is displayed on the device when the app is installed. On IOS, this should match
         * the name of your application in the Apple Provisioning Portal.
         * @cfg {String} applicationId
         * This is the name namespace for your application. On IOS, this should match the name of your application in the Apple Provisioning Portal.
         * @cfg {String} bundleSeedId
         * A ten character string which stands before aplication ID in Apple Provisioning Portal
         * @cfg {String} versionString
         * @required
         * This is the version of your application.
         * @cfg {Integer} versionCode
         * @required
         * This is the integer version code of your application, or you can refer to it as a build number. Used only for Android builds.
         * @cfg {Object} icon
         * For iOS, please refer to their documentation about icon sizes:
         * For Android, please refer to the Google Launcher icons guide:
         * iOS 7 uses 60, 76, 120, 152 (29, 58 for the Settings app; 40, 80 for Spotlight search results).
         * iOS 6.1 and earlier uses 57, 72, 114, 144 (29, 58 for the Settings app, for Spotlight search results on iPhone; 50 and 100 for Spotlight search results on iPad).
         * Android uses 36, 48, 72, 96.
         * If you package for Android you can ignore iOS icons and vice versa.
        "icon": {
            "120":"resources/icons/[email protected]",
            "152":"resources/icons/[email protected]",
            "114":"resources/icons/[email protected]",
            "144":"resources/icons/[email protected]",
            "58":"resources/icons/[email protected]",
            "80":"resources/icons/[email protected]",
            "100":"resources/icons/[email protected]"
         * @cfg {String} inputPath
         * @required
         * This is location of your Sencha Touch 2 application, relative to this configuration file.
         * @cfg {String} outputPath
         * @required
         * This is where the built application file with be saved. Make sure that output path is not in your input path, you may get into endless recursive copying
         * @cfg {String} configuration
         * @required
         * This is configuration for your application. `Debug` should always be used unless you are submitting your app to an online
         * store - in which case `Release` should be specified.
         * @cfg {String} platform
         * @required
         * This is the platform where you will be running your application. Available options are:
         *  - iOSSimulator
         *  - iOS
         *  - Android
         *  - AndroidEmulator
         * @cfg {String} deviceType
         * @required
         * This is device type that your application will be running on.
         * If you are developing for Android, this is not necessary.
         * Available options are:
         *  - iPhone
         *  - iPad
         *  - Universal
         * @cfg {String} certificatePath
         * This is the location of your certificate.
         * This is required when you are developing for Android or you are developing on Windows.
         * @cfg {String} certificateAlias
         * This is the name of your certificate.
         * IF you do not specify this on OSX, we will try and automatically find the certificate for you using the applicationId.
         * This can be just a simple matcher. For example, if your certificate name is "iPhone Developer: Robert Dougan (ABCDEFGHIJ)", you
         * can just put "iPhone Developer".
         * When using a certificatePath on Windows, you do not need to specify this.
         * @cfg {String} certificatePassword
         * The password which was specified during certificate export
         * @cfg {String} provisionProfile
         * The path to the provision profile (APP_NAME.mobileprovision) which you can create and then download from Apple's provisioning portal
         * @cfg {String} URLScheme
         * URL scheme for communication with your application, can be empty if you don't use custom URL scheme in your project.
         * @cfg {String} notificationConfiguration
         * Notification configuration for push notifications, can be "debug", "release" or empty if you don't use push notifications in your project.
         * @cfg {String} sdkPath
         * This is the path to the Android SDK, if you are developing an Android application.
         * @cfg {String} androidAPILevel
         * This is android API level, the version of Android SDK to use, you can read more about it here:
         * Be sure to install corresponding platform API in android SDK manager (android_sdk/tools/android)
         * @cfg {Array[String]} permissions
         * Array of permissions that is used by an application (Android only) 
         * Full list of permissions for Android application can be found here:
         * @cfg {Array[String]} orientations
         * @required
         * This is orientations that this application can run.
        "orientations": [

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Dallas/Fort Worth

    Default Cordova

    Part part of my suggestion is what I posted here:

    It is important to understand that Sencha Command is not a tool all by itself, it depends on other tools. Specifically the following:
    • Cordova (for Native)
    • Ant
    • JDK 7
    • Ruby
    • Compass
    • MSBuild (for Windows native)
    • xcodebuild (for iOS native)
    • ADT (for Android native)
    There are a lot of things which can cause native android to not build, here are a few causes:
    • Not having Ant on the PATH
    • Not having Java 7 on the PATH
    • Not having the Java 7 SDK as the JAVA_HOME environment variable
    • I have personally had issues with Cordova 3.1 and 3.2 not working with android, unable to add the platform
    • Cordova 3.4 has the wrong location of config.xml (
    My recommendation would be to take Sencha out of the equation, and attempt to build a pure Cordova "Hello World" application, using the debug flag:
    cordova -d create HelloWorld com.example.hello "HelloWorld"
    cd HelloWorld
    cordova -d platform add android
    cordova -d build
    If Cordova doesn't work, Sencha Command won't work.

  3. #3


    I managed to get it work.Before running the command "sencha app package build " I had to run "sencha app build native" on my app. Now my app is working on Android

Posting Permissions

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