1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    352
    Vote Rating
    1
    parky128 is on a distinguished road

      0  

    Default Error raised after a successful native build

    Error raised after a successful native build


    Hi,

    I have managed to get an application built into a native Android APK file, but in my console window, after the build succeeds I see the following error:

    Code:
    BUILD SUCCESSFUL
    Total time: 6 seconds
            pkg: /data/local/tmp/PinpointersTouch.apk
    
    
    Success
    
    
    Starting: Intent { cmp=sbs.pinpointers.pptouch/.STActivity }
    
    
    ""C:/AndroidSDK/android-sdk/tools/android" create project --target android-7 --n
    ame PinpointersTouch --activity STActivity --path "C:\Sencha\Projects\PPTouch\bu
    ild\native/" --package sbs.pinpointers.pptouch"
    
    
    [ERROR] 56 KB/s (848636 bytes in 14.707s)
    Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst
    =C:\Sencha\Projects\PPTouch\build\native//res/drawable-ldpi/icon.png
    Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst
    =C:\Sencha\Projects\PPTouch\build\native//res/drawable-mdpi/icon.png
    Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst
    =C:\Sencha\Projects\PPTouch\build\native//res/drawable-hdpi/icon.png
    
    
    
    
    C:\Sencha\Projects\PPTouch>
    Its seems its expecting to find a copy of the icon from the 'build/package' directory but the icon doesn't seem to get moved across from my root directory during the packaging process. The iconName property of the packager.json file says the icon should be in the same directory as the packager file which it is.

    Any ideas?
    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,617
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Try it without the double slashes
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

  3. #3
    Sencha User
    Join Date
    Jun 2009
    Posts
    352
    Vote Rating
    1
    parky128 is on a distinguished road

      0  

    Default


    Well I can't see anywhere in my packager.json file that has any double slashes in:

    Code:
    {
    	"applicationName":"Pinpointers Touch",
    	"applicationId":"sbs.pinpointers.pptouch",
    	"versionString":"1.0",
    	"iconName":"icon.png",
    	"inputPath":".",
    	"outputPath":"build/",
    	"configuration":"Debug",
    	"platform":"Android",
    	"deviceType":"Universal",
    	"certificatePath":"C:/Keystore/pinpointers-debug-key.keystore",
    	"certificateAlias":"pinpointers",
    	"sdkPath":"C:/AndroidSDK/android-sdk",
    	"androidAPILevel":"10",
    	"orientations": [
    		"portrait",
    		"landscapeLeft",
    		"landscapeRight",
    		"portraitUpsideDown"
    	]
    }
    I just tried another native package command and I get a 'device not found' error now:

    Code:
    BUILD SUCCESSFUL
    Total time: 6 seconds
    ""C:/AndroidSDK/android-sdk/tools/android" create project --target android-7 --n
    ame PinpointersTouch --activity STActivity --path "C:\Sencha\Projects\PPTouch\bu
    ild\native/" --package sbs.pinpointers.pptouch"
    Could not install application
    Failed to run packaged application
    
    
    [ERROR] error: device not found
    Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst
    =C:\Sencha\Projects\PPTouch\build\native//res/drawable-ldpi/icon.png
    Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst
    =C:\Sencha\Projects\PPTouch\build\native//res/drawable-mdpi/icon.png
    Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst
    =C:\Sencha\Projects\PPTouch\build\native//res/drawable-hdpi/icon.png
    A further observation, if I try to do a native package when I have already done one previously and I have content in my native and package directories already I get the following error:

    Code:
    BUILD SUCCESSFUL
    Total time: 6 seconds
    ""C:/AndroidSDK/android-sdk/tools/android" create project --target android-7 --n
    ame PinpointersTouch --activity STActivity --path "C:\Sencha\Projects\PPTouch\bu
    ild\native/" --package sbs.pinpointers.pptouch"
    Could not install application
    Failed to run packaged application
    
    
    [ERROR] Error: Project folder 'C:\Sencha\Projects\PPTouch\build\native' is not e
    mpty. Please consider using 'android.bat update' instead.
    error: device not found
    Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst
    =C:\Sencha\Projects\PPTouch\build\native//res/drawable-ldpi/icon.png
    Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst
    =C:\Sencha\Projects\PPTouch\build\native//res/drawable-mdpi/icon.png
    Copy operation failed src=C:\Sencha\Projects\PPTouch\build\package//icon.png dst
    =C:\Sencha\Projects\PPTouch\build\native//res/drawable-hdpi/icon.png
    Do you need to include some other command to clean out those directories? For now, I have just been manually deleting them to get around this but just thought I'd feed this back to you guys.

    Let me know your thoughts on this double slash issue further above.

    Thanks

  4. #4
    Sencha User
    Join Date
    Jun 2012
    Posts
    1
    Vote Rating
    0
    JulesMay is on a distinguished road

      0  

    Default


    If it's any help, I'm seeing the same thing here. android.json looks like this:
    Code:
    {    "applicationName":"HelloSencha",
        "applicationId":"com.SNW.HelloSencha",
        "iconName":"icon.png",
        "versionString":"1.0",
        "outputPath":"C:/websites/HelloSencha/build/android",
        "inputPath":"C:/websites/HelloSencha/htdocs",
        "configuration":"Debug",
        "platform":"Android",
        "deviceType":"Universal",
        "certificateAlias":"",
        "sdkPath":"C:/Program Files/Android/android-sdk",
        "orientations": [
            "portrait",
            "landscapeLeft",
            "landscapeRight",
            "portraitUpsideDown"
        ]
    
    
        /**
         * @cfg {String} inputPath
         * @required
         * This is location of your Sencha Touch 2 application, relative to this configuration file.
        "webAppPath":"build/android/www/",
        "certificatePath":"/path/to/certificate.file",
         */
    }
    and I'm getting the following output:
    Code:
    ... stuff omitted...
    BUILD SUCCESSFUL
    Total time: 23 seconds
    ""C:/Program Files/Android/android-sdk/tools/android" create project --target android-7 --name HelloSencha --activity STActivity --path "C:/websites/HelloSencha/build/android/" --package om.SenergyWorld.HelloSencha"
    [ERROR] Copy operation failed src=C:/websites/HelloSencha/htdocs//icon.png dst=C:/websites/HelloSencha/build/android//res/drawable-ldpi/icon.png
    Copy operation failed src=C:/websites/HelloSencha/htdocs//icon.png dst=C:/websites/HelloSencha/build/android//res/drawable-mdpi/icon.png
    Copy operation failed src=C:/websites/HelloSencha/htdocs//icon.png dst=C:/websites/HelloSencha/build/android//res/drawable-hdpi/icon.png
    This, incidentally, on a completely clean project - created from app create without any changes (except to create the android.json file)

    BTW, Running Windows XP SP 3, and SenchaSDKTools-2.0.0-beta 3

  5. #5
    Sencha User jaami's Avatar
    Join Date
    Apr 2012
    Location
    Texas
    Posts
    47
    Vote Rating
    0
    jaami is an unknown quantity at this point

      1  

    Default Same problem

    Same problem


    What do you mean by 'try it out'


    Could you please explain why we are getting same error?


    Hope that you will respond !!!

    btw: there isnt any double // or \\ in my config.json either.




    "applicationName":"MyApp",
    "applicationId":"jaami.co.cc.MyApp",
    "iconName":"icon.png",
    "versionCode":"1.0",
    "versionString":"1.0",
    "outputPath":"E:/temp/build",
    "inputPath":"E:/COPL",
    "configuration":"Debug",
    "platform":"Android",
    "deviceType":"Universal",
    "certificatePath":"mykey.kst",
    "certificateAlias":"alias_name",
    "sdkPath":"D:/Program Files/AndroidSDK",
    "androidAPILevel":"12",


    "orientations": [
    "portrait",
    "landscapeLeft",
    "landscapeRight",
    "portraitUpsideDown"
    ]


    i was able to generate package for Android 4.1 API level 16. the same way i am trying to generate package for Android xoom which is API level 12 Android 3.1




    E:\COPL>stbuild run e:\copl\config.json
    ""D:/Program Files/AndroidSDK\tools\android" create project --target android-12 --name MyA
    Created project directory: E:\temp\build
    Created directory E:\temp\build\src\jaami\co\cc\MyApp
    Added file E:\temp\build\src\jaami\co\cc\MyApp\STActivity.java
    Created directory E:\temp\build\res
    Created directory E:\temp\build\bin
    Created directory E:\temp\build\libs
    Created directory E:\temp\build\res\values
    Added file E:\temp\build\res\values\strings.xml
    Created directory E:\temp\build\res\layout
    Added file E:\temp\build\res\layout\main.xml
    Added file E:\temp\build\AndroidManifest.xml
    Added file E:\temp\build\build.xml
    Added file E:\temp\build\proguard-project.txt
    Copy operation failed src=E:/COPL\\icon.png dst=E:/temp/build\\res\drawable-ldpi\icon.png
    Can not open source file
    Copy operation failed src=E:/COPL\\icon.png dst=E:/temp/build\\res\drawable-mdpi\icon.png
    Can not open source file
    Copy operation failed src=E:/COPL\\icon.png dst=E:/temp/build\\res\drawable-hdpi\icon.png
    Can not open source file
    Buildfile: E:\temp\build\build.xml
    .
    .
    .
    continue .....
    .
    .
    .


    and then one more error


    BUILD SUCCESSFUL
    Total time: 7 seconds
    ""D:/Program Files/AndroidSDK\platform-tools\adb" install -r "E:/temp/build\MyApp.apk""
    error: protocol fault (no status)


    apk was generated in build folder but size is 291k which is obviously not right.


    Note: i created my app in Sencha Architect 2 and it runs good in browser. And then without making any change in source i am trying to generate android package.




    WIN7 32bit

  6. #6
    Sencha User
    Join Date
    Jul 2012
    Posts
    11
    Vote Rating
    0
    hawkinbj is on a distinguished road

      0  

    Default


    bump please. Even after installing the .msi "fix" for windows (which escapes the slashes) it apparently doesn't check the icon copying. Would be nice to have an official update as even the fix I referenced earlier is a user-made fix, though it doesn't work .