Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Image not showing in apk  (Read 1581 times)

0 Members and 1 Guest are viewing this topic.

Saud

  • Newbie
  • *
  • Posts: 9
    • View Profile
Image not showing in apk
« on: December 05, 2018, 12:29:56 am »
Hi,

I have downloaded a background from the web, its a royalty free .jpg image.

I used it in my project and it worked fine in SDL plugin run test,
but when i make an APK file and install the APK on my phone this particular image does not show.

can you tell me what might be the problem?
is it an SFML issue or maybe the image itself or the APK does not show certain images?

note:
i tried many royalty free background images, the same problem persist.
i tried converting them to many formats like png, jpg, psd and bmp, the same problem persist.
i use a resources folder and attach it to the APK so the games directory would be that folder.
other images work fine using the same code as the one with the issue.
« Last Edit: December 05, 2018, 12:52:33 am by Saud »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Image not showing in apk
« Reply #1 on: December 05, 2018, 08:46:19 am »
How are you loading the image, i.e. can you show some code?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Saud

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Image not showing in apk
« Reply #2 on: December 05, 2018, 03:32:04 pm »
How are you loading the image, i.e. can you show some code?

This issue haunted me for days, i almost tried everything possible to try to solve this problem,
except one thing i havent tried, which is change the APK name every time i export it to mobile.

what i used to do is, every time i want to export a new APK, i delete the one exported before with uninstalling its app, and then export it again to the device with the same name.
and that was the problem and changing APK name was the solution.
its like if you want to add a new image to your app, APK name should be different than the previous name.

Thanks for your reply, and sorry for the false alarm.
« Last Edit: December 05, 2018, 04:02:12 pm by Saud »