15 Nov 2012 3:17 AM #1
Ext.Img not loading in device
I just testing the Ext.Img for my application, when I load image from internet, it shows both in browser and mobile device. But if I use local image, then it only shows in browser not in mobile device.
src: 'http://www.sencha.com/assets/images/sencha-avatar-64x64.png' is working fine.
src: 'asset/icons/icon.png' not loading in mobile device.
Please let me know how to fix this.
15 Nov 2012 5:08 AM #2
This is probably because the path to the image is wrong or the resource has not been included by the native packager. The packager, by default, only includes these resources (excerpt from app.json):
/** * Extra resources to be copied along when build */ "resources": [ "resources/images", "resources/icons", "resources/startup" ],
I usually put everything in resources/images. So I'm fine with the Sencha defaults.
19 Nov 2012 12:06 AM #3
Hi.. When I create application from Sencha Architect I dont get app.json file.. I only get packager.json using sencha build command. Is both are same?
19 Nov 2012 12:42 AM #4
I think you have app.json. Only it is generated / maintained by Architect directly. But when you have a look on file system level you should see it.
And no, it's absolutely not the same as packager.json.
19 Nov 2012 2:21 AM #5
I am just executing "sencha package run android_config.json" command and generating".apk" file.
This .apk file I am coping to my android mobile device.
Once installing there.. I am not able to see the images.
19 Nov 2012 2:59 AM #6
You are correct - my apologies. I thought that it's handled the 'normal' way.
I upgraded my Architect to V2.1 (haven't used it for some time now) and did a quick test. Within my project structure I created a folder called images and put an image "image01.png" in there. Then I dropped an image component into a panel and put as source "images/image01.png". The image was shown in both architect and in my browser. Then I published the project and everything was still fine.