Software Archive
Read-only legacy content
17061 Discussions

AppFramework images work in emulator but not in build

Nick_d_
Beginner
491 Views

Hi,

Urgent help needed please. I built my APK for upload into the Google Play store last night, but when giving it a final run through I saw that some images do not display, as if they are missing. But they worked in the emulator just before the build, I checked the code and all looks good. I did a standard Android build, as well as a Crosswalk for Android and both versions are missing the same pics.

Can someone please urgently explain what could be happening? I need this sorted out so I can upload to the various app stores.

Thanks

Nick

0 Kudos
3 Replies
Chris_P_Intel
Employee
491 Views

Did you test it with App Preview?

I have three guesses:

  • the paths to your images contain spaces
  • the paths to your images in the HTML/CSS do no match the capitilization of the actual path.
  • You used windows pathname separators (\) instead of Unix (/).

spaces can wreak havoc when used in pathnames because depending upon the context you may need to encode them differently. However, if this were the problem, I think you'd have seen it already. But I could be wrong about that.  Anyway, my advice is to never use directories or file names that have spaces in them in your web projects.

Your Mac or Windows machine probably is liberal with resolving capital letters, but the phone devices are not. For example, the path to teh image might be:  MyImages/fun.JPG   , but in your CSS it may be "myimages/fun.jpg".  This will work anywhere on your machine, but once it goes to an actual iPhone or Android device it's party over.  My advice is to use lowercase for all directories, file names, and file extensions. If on Mac or WIndows make sure you can actually _see_ the file extensions.

A windows path separator will work on Windows, but will fail elsewhere.  Thus the path should be:  images/fun.jpg  not images\fun.jpg

 

 

0 Kudos
Elroy_A_Intel
Employee
491 Views

I recommend testing your application using the Debug Tab within Intel XDk. This testing option allows you to run your application on your device as a standalone app as you would with an application provided via the Build Tab. The important benefit with this option is that you will be able to debug your application and view the actually paths used for your problematic images in the DOM and any errors in the console.

0 Kudos
Nick_d_
Beginner
491 Views

Hi guys,

Thanks so much for your quick responses.

@Chris: you were right, I made a couple of amateur mistakes. I accidentally did captialise the image name (naughty me, I know) and thus it broke in the app. Busy sorting them out. Will be going live on Sunday evening to the Google Play Store. iOS and WP8 versions to follow early 2017 :-D

Thanks so much guys!

0 Kudos
Reply