Default.png shows in simulator but not on real dev

2019-04-24 14:55发布

i have added a splash screen to my application by adding Default.png. the splash screen works fine in the simulator but not showing on real device

6条回答
啃猪蹄的小仙女
2楼-- · 2019-04-24 15:00

Make sure the name of the file begins with a capital "D", then clean and rebuild.

查看更多
在下西门庆
3楼-- · 2019-04-24 15:02

Select your Default.png in the groups and files window and make sure in the file listing above the editor window that the checkbox on the far right is checked. Without this the file will not be copied to the application bundle after compilation is finished.

查看更多
Lonely孤独者°
4楼-- · 2019-04-24 15:06

The file name must be Default.png (with a capital D). Also, do a clean/rebuild of the entire project to ensure the most recent version of the file is being included in the project.

查看更多
神经病院院长
5楼-- · 2019-04-24 15:06

Make a "Default.png" file (with a capital "D"). Then clean all targets and build again.

查看更多
老娘就宠你
6楼-- · 2019-04-24 15:24

Sometimes this issue hapens, when .png file was renamed from .jpg file. So, for example, you had image.jpg, you've renamed in to image.png, and using this image.png. It'll be correctly displayed in simulator, and won't work on device

查看更多
Explosion°爆炸
7楼-- · 2019-04-24 15:25

Check the case of the file name.

Default.png, default.png, Default.PNG and DEFAULT.png are all different files on the device, but not in the simulator.

查看更多
登录 后发表回答