Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Sencha Touch 2.3 Android build failed

  1. #1
    Sencha User
    Join Date
    Oct 2013
    Location
    France
    Posts
    36
    Answers
    2

    Default Answered: Sencha Touch 2.3 Android build failed

    Hi,

    I change mu computer, i reinstalled sencha CMD 4, the jdk and jre, android skd but when i trye the command :

    Code:
    sencha app build native
    i have the following error :

    Sencha Cmd v4.0.1.45[INF]
    [INF] [echo] Building all specified mobile packager configs.
    [INF] [echo]
    [INF] [echo] Processing Mobile Packager config file
    [INF] [echo] config: C:\wamp\www\chartTest/packager.json
    [INF] [echo] inputPath: C:\wamp\www\chartTest/build/native/chartTest
    [INF] [echo] outputPath: C:\wamp\www\chartTest/build/native-package-mobile/chartTest/packager.json
    [INF] [echo] Running mobile packager action build on file C:\wamp\www\chartTest/packager.temp.json
    [ERR]
    Error: Project folder 'C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json' is not empty. Please consider using 'android.bat update' instead.
    Created directory C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\src\com\test\charTest
    Added file C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\src\com\test\charTest\STActivity.java
    Created directory C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\bin
    Created directory C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\libs
    Created directory C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\res\values
    Added file C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\res\values\strings.xml
    Created directory C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\res\layout
    Added file C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\res\layout\main.xml
    Added file C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\AndroidManifest.xml
    Added file C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\build.xml
    Added file C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\proguard-project.txt
    Un sous-r?pertoire ou un fichier C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\\libs\ existe d?j?.
    Un sous-r?pertoire ou un fichier C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\\assets\ existe d?j?.
    Buildfile: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\build.xml




    -set-mode-check:




    -set-debug-files:




    -check-env:
    [checkenv] Android SDK Tools Revision 22.3.0
    [checkenv] Installed at C:\Users\maxusn\AppData\Local\Android\android-sdk




    -setup:
    [echo] Project Name: charTest
    [gettype] Project Type: Application




    -set-debug-mode:




    -debug-obfuscation-check:




    -pre-build:




    -build-setup:
    [getbuildtools] Using latest Build Tools: 19.0.0
    [echo] Resolving Build Target for charTest...
    [gettarget] Project Target: Android 4.0
    [gettarget] API level: 14
    [echo] ----------
    [echo] Creating output directories if needed...
    [mkdir] Created dir: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\bin\res
    [mkdir] Created dir: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\bin\rsObj
    [mkdir] Created dir: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\bin\rsLibs
    [mkdir] Created dir: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\gen
    [mkdir] Created dir: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\bin\classes
    [mkdir] Created dir: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\bin\dexedLibs
    [echo] ----------
    [echo] Resolving Dependencies for charTest...
    [dependency] Library dependencies:
    [dependency] No Libraries
    [dependency]
    [dependency] ------------------
    [dependency] API<=15: Adding annotations.jar to the classpath.
    [echo] ----------
    [echo] Building Libraries with 'debug'...
    [subant] No sub-builds to iterate on




    -code-gen:
    [mergemanifest] Merging AndroidManifest files into one.
    [mergemanifest] Manifest merger disabled. Using project manifest only.
    [echo] Handling aidl files...
    [aidl] No AIDL files to compile.
    [echo] ----------
    [echo] Handling RenderScript files...
    [echo] ----------
    [echo] Handling Resources...
    [aapt] Generating resource IDs...
    [echo] ----------
    [echo] Handling BuildConfig class...
    [buildconfig] Generating BuildConfig class.




    -pre-compile:




    -compile:
    [javac] Compiling 3 source files to C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\bin\classes




    -post-compile:




    -obfuscate:




    -dex:
    [dex] input: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\bin\classes
    [dex] input: C:\Users\maxusn\AppData\Local\Android\android-sdk\tools\support\annotations.jar
    [dex] input: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\libs\guava-r09.jar
    [dex] input: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\libs\gcm.jar
    [dex] input: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\libs\nimblekit.jar
    [dex] input: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\libs\commons-codec.jar
    [dex] input: C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\libs\sqlcipher.jar
    [dex] Pre-Dexing C:\Users\maxusn\AppData\Local\Android\android-sdk\tools\support\annotations.jar -> annotations-8224e157502d2c7274b8490a11fde13e.jar
    [dex] Pre-Dexing C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\libs\guava-r09.jar -> guava-r09-1ed18d58abf88632cfe719c9476f0fad.jar
    [dex] Pre-Dexing C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\libs\gcm.jar -> gcm-2be2f07904dc5cfa32fad19e86eb20c1.jar
    [dex] Pre-Dexing C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\libs\nimblekit.jar -> nimblekit-cfd4e54fc728d420a7d1f4080acd695f.jar
    [dex] Pre-Dexing C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\libs\commons-codec.jar -> commons-codec-81eea87a042bd28dacf5535dfa2babd7.jar
    [dex] Pre-Dexing C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\libs\sqlcipher.jar -> sqlcipher-1ae622f6895b0a25b0e7d37dfe800756.jar
    [dex] Converting compiled files and external libraries into C:\wamp\www\chartTest\build\native-package-mobile\chartTest\packager.json\bin\classes.dex...
    [dx]
    [dx] UNEXPECTED TOP-LEVEL EXCEPTION:
    [dx] java.nio.BufferOverflowException
    [dx] at java.nio.Buffer.nextPutIndex(Buffer.java:519)
    [dx] at java.nio.HeapByteBuffer.putShort(HeapByteBuffer.java:315)
    [dx] at com.android.dex.Dex$Section.writeShort(Dex.java:818)
    [dx] at com.android.dex.Dex$Section.writeTypeList(Dex.java:870)
    [dx] at com.android.dx.merge.DexMerger$3.write(DexMerger.java:437)
    [dx] at com.android.dx.merge.DexMerger$3.write(DexMerger.java:423)
    [dx] at com.android.dx.merge.DexMerger$IdMerger.mergeUnsorted(DexMerger.java:317)
    [dx] at com.android.dx.merge.DexMerger.mergeTypeLists(DexMerger.java:423)
    [dx] at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:163)
    [dx] at com.android.dx.merge.DexMerger.merge(DexMerger.java:187)
    [dx] at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
    [dx] at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
    [dx] at com.android.dx.command.dexer.Main.run(Main.java:230)
    [dx] at com.android.dx.command.dexer.Main.main(Main.java:199)
    [dx] at com.android.dx.command.Main.main(Main.java:103)




    BUILD FAILED
    C:\Users\maxusn\AppData\Local\Android\android-sdk\tools\ant\build.xml:892: The following error occurred while executing this line:
    C:\Users\maxusn\AppData\Local\Android\android-sdk\tools\ant\build.xml:894: The following error occurred while executing this line:
    C:\Users\maxusn\AppData\Local\Android\android-sdk\tools\ant\build.xml:906: The following error occurred while executing this line:
    C:\Users\maxusn\AppData\Local\Android\android-sdk\tools\ant\build.xml:284: null returned: 2




    Total time: 16 seconds
    ""C:\Users\maxusn\AppData\Local\Android\android-sdk\tools\android" create project --target android-14 --name charTest --activity STActivity --path "C:\wamp\www\chartTest/build/native-package-mobile/chartTest/packager.json\/" --package com.test.charTest"
    Can not open source file
    Can not open source file
    Can not open source file
    Could not run ant with error: 1
    Failed to package application
    Copy operation failed src=C:\wamp\www\chartTest/build/native/chartTest\\ dst=C:\wamp\www\chartTest/build/native-package-mobile/chartTest/packager.json\\res\drawable-ldpi\icon.png
    Copy operation failed src=C:\wamp\www\chartTest/build/native/chartTest\\ dst=C:\wamp\www\chartTest/build/native-package-mobile/chartTest/packager.json\\res\drawable-mdpi\icon.png
    Copy operation failed src=C:\wamp\www\chartTest/build/native/chartTest\\resources/icons/LogoLXP.png dst=C:\wamp\www\chartTest/build/native-package-mobile/chartTest/packager.json\\res\drawable-hdpi\icon.png




    [ERR]
    [ERR] BUILD FAILED
    [ERR] com.sencha.exceptions.ExProcess: stbuild exited with non-zero code : 7
    [ERR] at sun.reflect.DelegatingMet
    [ERR] hodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [ERR]
    [ERR] Total time: 27 seconds
    [ERR] The following error occurred while executing this line:
    C:\wamp\www\chartTest\.sencha\app\build-impl.xml:422: The following error occurred while executing this line:
    C:\wamp\www\chartTest\.sencha\app\packager-impl.xml:112: The following error occurred while executing this line:
    C:\wamp\www\chartTest\.sencha\app\packager-impl.xml:114: The following error occurred while executing this line:
    C:\wamp\www\chartTest\.sencha\app\packager-impl.xml:98: The following error occurred while executing this line:
    C:\wamp\www\chartTest\.sencha\app\packager-impl.xml:7: com.sencha.exceptions.ExProcess: stbuild exited with non-zero code : 7
    i'm on windows 8.
    sencha CMD is installed on : C:\senchaCmd\Sencha\Cmd\4.0.1.45
    I set my JAVA_HOME : C:\Program Files (x86)\Java\jdk1.7.0_45
    CLASSPATH : C:\Program Files\Java\jdk1.7.0_45\lib\tools.jar
    and in Path : C:\Program Files (x86)\Java\jdk1.7.0_45\bin;

    an idea ?

    thanks

  2. problem solved : i reinstalled my Android SKD in
    C:\Android
    and it works

    Thanks for your help fmoseley

  3. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    What version of Ruby are you running? What does your packager.json file look like?
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

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

    Need to include a test case use:
    The official Sencha Fiddle

  4. #3
    Sencha User
    Join Date
    Oct 2013
    Location
    France
    Posts
    36
    Answers
    2

    Default

    I use ruby 1.9.3p374

    my packager.json :

    Code:
    {    "applicationName": "testMobile",
        "applicationId": "com.test.testMobile",
        "outputPath": "../build/",
        "versionString": "1.0",
        "versionCode": "1",
        "inputPath": ".\\",
        "icon": {
            "57": "resources/icons/Logo.png",
            "72": "resources/icons/Logo.png",
            "114": "resources/icons/Logo.png",
            "144": "resources/icons/Logo.png"
        },
        "configuration": "debug",
        "platform": "android",
        "certificatePath": "test.keystore",
        "certificateAlias": "test",
        "certificatePassword": "testmobile",
        "permissions": [
            "INTERNET",
            "ACCESS_NETWORK_STATE",
            "CAMERA",
            "VIBRATE",
            "ACCESS_FINE_LOCATION",
            "ACCESS_COARSE_LOCATION",
            "CALL_PHONE"
        ],
        "sdkPath": "C:\\Users\\maxusn\\AppData\\Local\\Android\\android-sdk",
        "androidAPILevel": "14",
        "orientations": [
            "portrait",
            "landscapeLeft",
            "landscapeRight",
            "portraitUpsideDown"
        ]
    }

  5. #4
    Sencha User
    Join Date
    Oct 2013
    Location
    France
    Posts
    36
    Answers
    2

    Default

    I still have the same error.

  6. #5
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    change your inputPath in your packager.json to
    Code:
    "inputPath":"./",
    Also there is an issue with your sdkPath. Change \\ to \
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

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

    Need to include a test case use:
    The official Sencha Fiddle

  7. #6
    Sencha User
    Join Date
    Oct 2013
    Location
    France
    Posts
    36
    Answers
    2

    Default

    Quote Originally Posted by fmoseley View Post
    change your inputPath in your packager.json to
    Code:
    "inputPath":"./",
    Also there is an issue with your sdkPath. Change \\ to \
    sorry for the long time since my last post.

    I changed my packger as you say :

    Code:
    {    "applicationName": "testMobile",
        "applicationId": "com.test.testMobile",
        "outputPath": "../build/",
        "versionString": "1.0",
        "versionCode": "1",
        "inputPath": "./",
        "icon": {
            "57": "resources/icons/Logo.png",
            "72": "resources/icons/Logo.png",
            "114": "resources/icons/Logo.png",
            "144": "resources/icons/Logo.png"
        },
        "configuration": "debug",
        "platform": "android",
        "certificatePath": "test.keystore",
        "certificateAlias": "test",
        "certificatePassword": "testmobile",
        "permissions": [
            "INTERNET",
            "ACCESS_NETWORK_STATE",
            "CAMERA",
            "VIBRATE",
            "ACCESS_FINE_LOCATION",
            "ACCESS_COARSE_LOCATION",
            "CALL_PHONE"
        ],
        "sdkPath": "C:/Users/maxusn/AppData/Local/Android/android-sdk",
        "androidAPILevel": "14",
        "orientations": [
            "portrait",
            "landscapeLeft",
            "landscapeRight",
            "portraitUpsideDown"
        ]
    }
    but I still have the same error :

    [ERR] com.sencha.exceptions.ExProcess: stbuild exited with non-zero code : 7
    [ERR] at sun.reflect.DelegatingMet

  8. #7
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    Are you using Sencha Architect? I also notice that some of the options for iOS builds are set in your packager.json (ie certificatePath, certificateAlias, etc..). This is known to cause issues and they should be set to their defaults. You should use separate packager.json for your iOS and android builds.
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

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

    Need to include a test case use:
    The official Sencha Fiddle

  9. #8
    Sencha User
    Join Date
    Oct 2013
    Location
    France
    Posts
    36
    Answers
    2

    Default

    Quote Originally Posted by fmoseley View Post
    Are you using Sencha Architect? I also notice that some of the options for iOS builds are set in your packager.json (ie certificatePath, certificateAlias, etc..). This is known to cause issues and they should be set to their defaults. You should use separate packager.json for your iOS and android builds.
    No I don't use Sencha Architect, I have this problem since i useWindows 8.

    I ran the command : : sencha app build native > buildlog.txt sencha diag show-props > diag.txt

    this is my diag.txt : diag.txt

  10. #9
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    Did you try removing the iOS specific build options from your packager.json?

    For Android you only need set the following options:
    Code:
    1. specify sdkPath-  This is the path to the adroid sdk
    "sdkPath":"/Applications/adt-bundle-mac/sdk"
    
    2. applicationId-
    "applicationId": "com.Sencha.APPNAME"
    
    3. platform- This is the platform where you will be running your application.  Available options are Android and AndroidEmulator
    "platform":"Android"
    
    4. set androidAPILevel to the version of Android OS your app is targeting.
    "androidAPILevel":"17"
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

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

    Need to include a test case use:
    The official Sencha Fiddle

  11. #10
    Sencha User
    Join Date
    Oct 2013
    Location
    France
    Posts
    36
    Answers
    2

    Default

    Quote Originally Posted by fmoseley View Post
    Did you try removing the iOS specific build options from your packager.json?

    For Android you only need set the following options:
    Code:
    1. specify sdkPath-  This is the path to the adroid sdk
    "sdkPath":"/Applications/adt-bundle-mac/sdk"
    
    2. applicationId-
    "applicationId": "com.Sencha.APPNAME"
    
    3. platform- This is the platform where you will be running your application.  Available options are Android and AndroidEmulator
    "platform":"Android"
    
    4. set androidAPILevel to the version of Android OS your app is targeting.
    "androidAPILevel":"17"
    I try with these values in my packager :
    "applicationName": "testMobile",
    "applicationId": "com.test.testMobile",
    "outputPath": "../build/",
    "versionString": "1.0",
    "versionCode": "1",
    "inputPath": "./",
    "icon": {
    "48":"resources/icons/Icon_Android48.png",
    "72":"resources/icons/Icon_Android72.png",
    "96":"resources/icons/Icon_Android96.png"
    },
    "configuration": "debug",
    "platform": "android",
    "sdkPath": "C:/Users/maxusn/AppData/Local/Android/android-sdk",
    "androidAPILevel": "14"
    and the build failed with the same error

Page 1 of 2 12 LastLast

Posting Permissions

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