Threaded View

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Vote Rating
    huberte will become famous soon enough


    Default Unable to run apk

    Unable to run apk

    Hi, I'm under s 2.1 and cmd 250,

    I did everything right (I suppose)

    I did run run on localhost : no error, no warning on console

    I did buil testing : no error, running fine, no error on console

    When I build production (build a new sencha project, clean folder), no errors, when I run the projetc

    Error evaluating with message: SyntaxError: Unexpected identifier
    Here is the G function, copied from developper tools :

    f=e.iframe,f.contentWindow===a){e.callback(b);k.body.removeChild(f);m.splice(c,1);break}}function G(a){"undefined"!=typeof console&&(console.error||console.log).call(console,a)}function t(a,b){try{n.setItem(a,b)}catch(c){if(c.code==c.QUOTA_EXCEEDED_ERR&&q){var{return a.key}),e=0,f=n.length,l=!1,j;for(d.push(q.key);e<=f-1;)j=n.key(e),-1==d.indexOf(j)?(n.removeItem(j),l=!0,f--):e++;l&&t(a,b)}}}function u(a){try{return n.getItem(a)}catch(d){return null}}function M(){H||(H=
    Reloading and the app runs fine

    Document was loaded from Application Cache with manifest
    Application Cache Checking event
    Application Cache NoUpdate event

    When I build apk, no errors, stuck on the loading screen...

    Here is the debug log from the sencha package build :

    D:\wamp\www\myapp>sencha --debug package build and.jsonSencha Cmd v3.0.0.250
    [DBG]           using path C:\apps\SenchaCMD\Sencha\Cmd\\stbuild;C:\apps\SenchaCMD\Sencha\Cmd\\stbuild\bin;C:\apps\SenchaCMD\Sencha\Cmd\;C:\apps\Ruby\bin;C:\Windows\system32
    ;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\apps\java\jdk\bin;C:\Program Files (x86)\MiKTeX 2.9\mikt
    ex\bin\;C:\Program Files\nodejs\;C:\apps\apache-ant-1.8.4\bin;C:\apps\npm\
    [DBG]           executable located at C:\apps\SenchaCMD\Sencha\Cmd\\stbuild\stbuild.exe
    [DBG]           using workding directory .
    Created project directory: D:\Application\app\myapp
    Created directory D:\Application\app\myapp\src\com\myapp\com
    Added file D:\Application\app\myapp\src\com\myapp\com\
    Created directory D:\Application\app\myapp\res
    Created directory D:\Application\app\myapp\bin
    Created directory D:\Application\app\myapp\libs
    Created directory D:\Application\app\myapp\res\values
    Added file D:\Application\app\myapp\res\values\strings.xml
    Created directory D:\Application\app\myapp\res\layout
    Added file D:\Application\app\myapp\res\layout\main.xml
    Added file D:\Application\app\myapp\AndroidManifest.xml
    Added file D:\Application\app\myapp\build.xml
    Added file D:\Application\app\myapp\proguard-project.txt
    Buildfile: D:\Application\app\myapp\build.xml
     [checkenv] Android SDK Tools Revision 20.0.3
     [checkenv] Installed at C:\apps\android-sdk
         [echo] Project Name: myapp2012
      [gettype] Project Type: Application
         [echo] Resolving Build Target for myapp2012...
    [gettarget] Project Target:   Android 2.3.3
    [gettarget] API level:        10
         [echo] ----------
         [echo] Creating output directories if needed...
        [mkdir] Created dir: D:\Application\app\myapp\bin\res
        [mkdir] Created dir: D:\Application\app\myapp\gen
        [mkdir] Created dir: D:\Application\app\myapp\bin\classes
         [echo] ----------
         [echo] Resolving Dependencies for myapp2012...
    [dependency] Library dependencies:
    [dependency] No Libraries
    [dependency] ------------------
    [dependency] API<=15: Adding annotations.jar to the classpath.
         [echo] ----------
         [echo] Building Libraries with 'debug'...
       [subant] No sub-builds to iterate on
    [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...
    [renderscript] No RenderScript files to compile.
         [echo] ----------
         [echo] Handling Resources...
         [aapt] Generating resource IDs...
         [echo] ----------
         [echo] Handling BuildConfig class...
    [buildconfig] Generating BuildConfig class.
        [javac] Compiling 3 source files to D:\Application\app\myapp\bin\classes
          [dex] Converting compiled files and external libraries into D:\Application\app\myapp\bin\classes.dex...
       [crunch] Crunching PNG Files in source dir: D:\Application\app\myapp\res
       [crunch] To destination dir: D:\Application\app\myapp\bin\res
       [crunch] Processing image to cache: D:\Application\app\myapp\res\drawable-hdpi\icon.png => D:\Application\app\myapp\bin\res\drawable-hdpi\icon.png
       [crunch]   (processed image to cache entry D:\Application\app\myapp\bin\res\drawable-hdpi\icon.png: 55% size of source)
       [crunch] Processing image to cache: D:\Application\app\myapp\res\drawable-ldpi\icon.png => D:\Application\app\myapp\bin\res\drawable-ldpi\icon.png
       [crunch]   (processed image to cache entry D:\Application\app\myapp\bin\res\drawable-ldpi\icon.png: 0% size of source)
       [crunch] Processing image to cache: D:\Application\app\myapp\res\drawable-mdpi\icon.png => D:\Application\app\myapp\bin\res\drawable-mdpi\icon.png
       [crunch]   (processed image to cache entry D:\Application\app\myapp\bin\res\drawable-mdpi\icon.png: 0% size of source)
       [crunch] Crunched 3 PNG files to update cache
         [aapt] Creating full resource package...
         [aapt]     (skipping dir '.sencha' due to ANDROID_AAPT_IGNORE pattern '.*')
         [aapt]     (skipping dir '.sass-cache' due to ANDROID_AAPT_IGNORE pattern '.*')
    [apkbuilder] Current build type is different than previous build: forced apkbuilder run.
    [apkbuilder] Creating myapp2012-debug-unaligned.apk and signing it with a debug key...
     [zipalign] Running zip align on final apk...
         [echo] Debug Package: D:\Application\app\myapp\bin\myapp2012-debug.apk
    [propertyfile] Creating new property file: D:\Application\app\myapp\bin\build.prop
    [propertyfile] Updating property file: D:\Application\app\myapp\bin\build.prop
    [propertyfile] Updating property file: D:\Application\app\myapp\bin\build.prop
    [propertyfile] Updating property file: D:\Application\app\myapp\bin\build.prop
    Total time: 20 seconds
    Warning: config file does not contain any application permissions, please verify application does not access any hardware features like camera, GPS, etc
    ""C:/apps/android-sdk\tools\android" create project --target android-10 --name myapp2012 --activity STActivity --path "D:/Application/appl/\/" --package
    [DBG]           exit code was : 0
    [DBG]           exit code was : 0

    What else could I do to check where the errors is ? What should I do ?

    I did try weinre :

    but nobody could explained to me how to proper use it, since it doesn't work in index.html :

    </style>    <script src=""></script>    <!-- The line below must be kept intact for Sencha Command to build your application -->    <script id="microloader" type="text/javascript" src="touch/microloader/development.js"></script>

    Edit: weinre works with the web-app on android phone (wamp server), not working with app pack in apk
    Last edited by huberte; 17 Nov 2012 at 10:39 PM. Reason: adding weinre details and apk build details

Tags for this Thread