1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    1
    Vote Rating
    0
    Morgan21 is on a distinguished road

      0  

    Default Failed running native packager for Android

    Failed running native packager for Android


    Hi, i started using the new Sencha Cmd 3.0.0.190 in one of my projects. All seemd to work fine until I tried to deploy my app as a native Android application. Here's the Command Line (I am currently working un Win 7 Ultimate OS):
    Code:
    C:\Program Files (x86)\EasyPHP-12.0\www\mobile20>sencha app build -e native
    Sencha Cmd v3.0.0.190
    [INFO ]
    [INFO ]         init-properties:
    [INFO ]
    [INFO ]
    [INFO ]         init-sencha-command:
    [INFO ]
    [INFO ]
    [INFO ]         init:
    [INFO ]
    [INFO ]
    [INFO ]         -before-app-build:
    [INFO ]
    [INFO ]
    [INFO ]         app-build-impl:
    [INFO ]
    [INFO ]         building application
    [INFO ]         Deploying your application to C:\Program Files (x86)\EasyPHP-12.
    0\www\mobile20\build\default\package
    [INFO ]         Copied app.js
    [INFO ]         Copied resources/css/app.css
    [INFO ]         Copied C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\resource
    s\icons
    [INFO ]         Copied C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\resource
    s\startup
    [INFO ]         Resolving your application dependencies (file:///C:/Program File
    s (x86)/EasyPHP-12.0/www/mobile20/index.html)
    [INFO ]         Compiling app.js and dependencies
    [INFO ]         Processing classPath entry : C:\Program Files (x86)\EasyPHP-12.0
    \www\mobile20\sencha-compile-temp-dir
    [INFO ]         Processing classPath entry : C:\Program Files (x86)\EasyPHP-12.0
    \www\mobile20\touch\src
    [INFO ]         Processing classPath entry : C:\Program Files (x86)\EasyPHP-12.0
    \www\mobile20\app.js
    [INFO ]         Processing classPath entry : C:\Program Files (x86)\EasyPHP-12.0
    \www\mobile20\app
    [WARN ]         [ [1000] : Yui Compressor Warning <> Trailing comma is not legal
     in an ECMA-262 object initializer => }, function() { ] :: ( C:\Program Files (x
    86)\EasyPHP-12.0\www\mobile20\touch\src\app\Controller.js => 625 : 1 )
    [INFO ]         Processing class inheritance graph
    [INFO ]         Processing instantiation refereces to classes and aliases
    [WARN ]         [ [1000] : Yui Compressor Warning <> Trailing comma is not legal
     in an ECMA-262 object initializer => }, function() { ] :: ( C:\Program Files (x
    86)\EasyPHP-12.0\www\mobile20\touch\src\app\Controller.js => 625 : 1 )
    [INFO ]         Processing source dependencies
    [INFO ]         Concatenating output to file C:\Program Files (x86)\EasyPHP-12.0
    \www\mobile20\build\default\package\app.js
    [INFO ]         Completed compilation.
    [INFO ]         Processed remote file touch/sencha-touch.js
    [INFO ]         Processed local file app.js
    [INFO ]         Minified app.js
    [INFO ]         Minified resources/css/app.css
    [INFO ]         Generated app.json
    [INFO ]         Embedded microloader into index.html
    [INFO ]         Packaging your application as a native app...
    [ERROR]         failed running native packager
    [ERROR]         Created directory C:\Program Files (x86)\EasyPHP-12.0\www\mobile
    20\build\native\src\com\mycompany\myAppID
    Added file C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\build\native\src\com
    \mycompany\myAppID\STActivity.java
    Created directory C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\build\native\
    res
    Created directory C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\build\native\
    bin
    Created directory C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\build\native\
    libs
    Created directory C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\build\native\
    res\values
    Added file C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\build\native\res\val
    ues\strings.xml
    Created directory C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\build\native\
    res\layout
    Added file C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\build\native\res\lay
    out\main.xml
    Added file C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\build\native\Android
    Manifest.xml
    Added file C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\build\native\build.x
    ml
    Added file C:\Program Files (x86)\EasyPHP-12.0\www\mobile20\build\native\proguar
    d-project.txt
    'C:\Users\Software' is not recognized as an internal or external command,
    operable program or batch file.
    ""C:/Program Files (x86)/Android/android-sdk\tools\android" create project --tar
    get android-7 --name MobileTester20 --activity STActivity --path "C:\Program Fil
    es (x86)\EasyPHP-12.0\www\mobile20\build\native\/" --package com.mycompany.myApp
    ID"
    Could not run ant with error: 1
    Failed to package application
    
    
    [ERROR]         Exception running app build : JavaException: com.sencha.exceptio
    ns.ExBuild: failed running native packager
    [ERROR]         javax.script.ScriptException: JavaException: com.sencha.exceptio
    ns.ExBuild: failed running native packager in <Unknown source> at line number 70
    9
    
    
    C:\Program Files (x86)\EasyPHP-12.0\www\mobile20>


    And this is the content of my package.json:

    Code:
    {
    	/**
    	 * @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.
    	 */
    	"applicationName":"MobileTester20",
    
    
    	/**
    	 * @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.
    	 */
    	"applicationId":"com.mycompany.myAppID",
    
    
    	/**
    	 * @cfg {String} bundleSeedId
    	 * A ten character string which stands before aplication ID in Apple Provisioning Portal
    	 */
    	"bundleSeedId":"KPXFEPZ6EF",
    
    
    	/**
    	 * @cfg {String} versionString
    	 * @required
    	 * This is the version of your application.
    	 */
    	"versionString":"2.0",
    
    
    	/**
    	 * @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.
    	 */
    	"versionCode":"2",
    
    
    	/**
    	 * @cfg {Object} icon
    	 * For iOS, please refer to their documentation about icon sizes:
    	 * https://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html
    	 *
    	 * For Android, please refer to the Google Launcher icons guide:
    	 * http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html
    	 */
    	"icon": {
    		"57":"resources/icons/Icon.png",
    		"72":"resources/icons/Icon~ipad.png",
    		"114":"resources/icons/Icon@2x.png",
    		"144":"resources/icons/Icon~ipad@2x.png"
    	},
    
    
    	/**
    	 * @cfg {String} inputPath
    	 * @required
    	 * This is location of your Sencha Touch 2 application, relative to this configuration file.
    	 */
    	"inputPath":"./",
    
    
    	/**
    	 * @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
    	 */
    	"outputPath":"../build/",
    
    
    	/**
    	 * @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.
    	 */
    	"configuration":"Debug",
    
    
    	/**
    	 * @cfg {String} platform
    	 * @required
    	 * This is the platform where you will be running your application. Available options are:
    	 *  - iOSSimulator
    	 *  - iOS
    	 *  - Android
    	 *  - AndroidEmulator
    	 */
    	"platform":"Android",
    
    
    	/**
    	 * @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
    	 */
    	"deviceType":"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.
    	 */
    	"certificatePath":"/path/to/certificate.file",
    
    
    	/**
    	 * @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.
    	 */
    	"certificateAlias":"",
    	/**
    	 * @cfg {String} sdkPath
    	 * This is the path to the Android SDK, if you are developing an Android application.
    	 */
    	"sdkPath":"C:/Program Files (x86)/Android/android-sdk",
    
    
    	/**
    	/**
    	 * @cfg {String} androidAPILevel
    	 * This is android API level, the version of Android SDK to use, you can read more about it here: http://developer.android.com/guide/appendix/api-levels.html.
    	 * Be sure to install corresponding platform API in android SDK manager (android_sdk/tools/android)
    	 */
    	"androidAPILevel":"7",
    
    
    	/**
    	/**
    	 * @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: http://developer.android.com/reference/android/Manifest.permission.html#ACCESS_CHECKIN_PROPERTIES
    	 */
    	"permissions":[
    					"INTERNET",
    					"ACCESS_NETWORK_STATE",
    					"CAMERA",
        				"VIBRATE",
        				"ACCESS_FINE_LOCATION",
        				"ACCESS_COARSE_LOCATION",
        				"CALL_PHONE"],
    
    
    	/**
    	 * @cfg {Array[String]} orientations
    	 * @required
    	 * This is orientations that this application can run.
    	 */
    	"orientations": [
    		"portrait",
    		"landscapeLeft",
    		"landscapeRight",
    		"portraitUpsideDown"
    	]
    }
    Any ideas on what I'm missing? Any help will be highly appreciated, thank you.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,219
    Vote Rating
    859
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Looks like the native packager (the thing that actually will create the package) fails to start. There is a 201 build of Cmd available. You could also use the -debug flag to have the debug messages.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    43
    Vote Rating
    0
    fatfly is on a distinguished road

      0  

    Default


    Hi I had the same issues.

    you have line saying 'C:\Users\Software' is not recognized as an internal or external command,...

    Try reinstalling sencha cmd in a foder directory without any space in the directory.

    i install it in "Program Files" and it wasn't working. I moved sencha cmd then the packager start.
    now i have another error.

  4. #4
    Sencha Premium Member
    Join Date
    Nov 2007
    Posts
    4
    Vote Rating
    0
    techtigre is on a distinguished road

      0  

    Default


    I just went through this excercise last week. I got the same errors
    during my android build attempts only to find that my Windows PATH
    variable did not include ANT. This is what solved the problem for ME:

    1. Installed ANT version 1.8xxx in C:\ant directory (extracted zip file and renamed to 'ant')
    2. Added the following to my Windows PATH directory - c:\ant;c:\ant\bin
    3. Also made sure that the java sdk was in my PATH as well (c:\Progra~1\Java\jdk.x.x;c:\Progra~1\Java\jdk.x.x;\bin)


    Assuming you have all the right correct parameters set in your packager.json file the build should continue past this error after your ANT enviro is set up correctly.

    *note: after you add the following entries above, go to command line from any directory and type:
    >ant -version. You should see something like "Apache Ant(TM)version 1.xxxx compiled on May 22, 2012"
    depending on the version of ANT you installed.

  5. #5
    Sencha User
    Join Date
    Mar 2013
    Posts
    12
    Vote Rating
    0
    sudhakarv is on a distinguished road

      0  

    Default failed running native packager The filename, directory name, or volume label syntax

    failed running native packager The filename, directory name, or volume label syntax


    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.
    C:\Users\sudhakar_V03>d:
    D:\>
    D:\>
    D:\>
    D:\>
    D:\>
    D:\>
    D:\>cd D:\senchaTest\SDKApp\MyApp
    D:\senchaTest\SDKApp\MyApp>sencha app build native
    Sencha Cmd v3.1.0.239
    [INF]
    [INF] init-plugin:
    [INF]
    [INF] init-plugin:
    [INF] Invoking plugin (D:\senchaTest\SDKApp\MyApp\.sencha\app\plugin.xml) - supp
    orted targets: -before-app-build
    [INF]
    [INF] -before-app-build:
    [INF] Invoking plugin (D:\senchaTest\SDKApp\MyApp\.sencha\app\plugin.xml) - supp
    orted targets: app-build
    [INF]
    [INF] cmd-root-plugin.init-properties:
    [INF]
    [INF] init-properties:
    [INF]
    [INF] init-sencha-command:
    [INF]
    [INF] init:
    [INF]
    [INF] -before-app-build:
    [INF]
    [INF] app-build-impl:
    [INF]
    [INF] native:
    [INF]
    [INF] -before-init-local:
    [INF]
    [INF] -init-local:
    [INF]
    [INF] -after-init-local:
    [INF]
    [INF] init-local:
    [INF]
    [INF] find-cmd:
    [INF]
    [INF] -before-init:
    [INF]
    [INF] -init:
    [INF] Initializing Sencha Cmd ant environment
    [INF] Adding antlib taskdef for com/sencha/command/compass/ant/antlib.xml
    [INF]
    [INF] -after-init:
    [INF]
    [INF] init:
    [INF]
    [INF] -before-build:
    [INF]
    [INF] sass:
    [INF]
    [INF] -before-sass:
    [INF]
    [INF] -sass:
    [INF] executing compass using system installed ruby runtime
    identical ../css/app.css
    [INF]
    [INF] -after-sass:
    [INF]
    [INF] page:
    [INF]
    [INF] -before-page:
    [INF]
    [INF] -page:
    [INF] building application
    [INF] Deploying your application to D:\senchaTest\SDKApp\MyApp\build\MyApp\packa
    ge
    [INF] Copied D:\senchaTest\SDKApp\MyApp\app.js to D:\senchaTest\SDKApp\MyApp\bui
    ld\MyApp\package\app.js
    [INF] Copied D:\senchaTest\SDKApp\MyApp\resources\css\app.css to D:\senchaTest\S
    DKApp\MyApp\build\MyApp\package\resources\css\app.css
    [WRN] File or folder D:\senchaTest\SDKApp\MyApp\resources\images not found
    [INF] Copied D:\senchaTest\SDKApp\MyApp\resources\icons
    [INF] Copied D:\senchaTest\SDKApp\MyApp\resources\startup
    [INF] Resolving your application dependencies (file:///D:/senchaTest/SDKApp/MyAp
    p/index.html)
    [INF] Compiling app.js and dependencies
    [INF] Loading classpath entry D:\senchaTest\SDKApp\MyApp\touch\src
    [INF] Loading classpath entry D:\senchaTest\SDKApp\MyApp\app.js
    [INF] Loading classpath entry D:\senchaTest\SDKApp\MyApp\app
    [INF] Concatenating output to file D:\senchaTest\SDKApp\MyApp\build\MyApp\packag
    e\app.js
    [INF] Completed compilation.
    [INF] Processed remote file touch/sencha-touch.js
    [INF] Processed local file app.js
    [INF] Minified app.js
    [INF] Minified resources/css/app.css
    [INF] Generated app.json
    [INF] Embedded microloader into index.html
    [INF] Generating native package
    [INF] Packaging your application as a native app to D:\senchaTest\SDKApp\MyApp\b
    uild\MyApp\native ...
    [ERR] failed running native packager
    [ERR] The filename, directory name, or volume label syntax is incorrect.
    "" D:/adt-bundle-windows-x86/sdk\tools\android" create project --target android-
    17 --name MyApp --activity STActivity --path "D:\senchaTest\SDKApp\MyApp\build\M
    yApp\native\/" --package MyApp"
    Failed to create android project
    Failed to package application
    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.BasicException: The following error occurred while e
    xecuting this line:
    [ERR] D:\senchaTest\SDKApp\MyApp\.sencha\app\build-impl.xml:249: com.sencha.exce
    ptions.ExScript: Wrapped com.sencha.exceptions.ExBuild: failed running native pa
    ckager (x-app-build#506) [anonymous] (x-app-build:506) each (D:\SenchaCMD3\S
    encha\Cmd\3.1.0.239\ant\ant-util.js:695) runAppBuild (x-app-build:303) [anon
    ymous] (x-app-build:562) x_app_build (x-app-build:560) <script> (anonymous:1
    )
    [ERR] at sun.reflect.NativeConstructorAccessorImpl.newInsta
    [ERR] nce(Unknown Source)
    [ERR]
    [ERR] Total time: 20 seconds
    [ERR] com.sencha.exceptions.BasicException: The following error occurred while e
    xecuting this line:
    D:\senchaTest\SDKApp\MyApp\.sencha\app\build-impl.xml:249: com.sencha.exceptions
    .ExScript: Wrapped com.sencha.exceptions.ExBuild: failed running native packager
    (x-app-build#506)
    [anonymous] (x-app-build:506)
    each (D:\SenchaCMD3\Sencha\Cmd\3.1.0.239\ant\ant-util.js:695)
    runAppBuild (x-app-build:303)
    [anonymous] (x-app-build:562)
    x_app_build (x-app-build:560)
    <script> (anonymous:1)
    D:\senchaTest\SDKApp\MyApp>