Xcode 7 warning: The launch image does not have a

2019-02-16 13:35发布

Xcode 7 has warnings for my launch image set. It reads:

The launch image set "LaunchImage" references a file "Default@2x.PNG", but that file does not have a valid extension.

I tried removing the image and put it back again with no luck. What is it warning about and how can I fix it?

4条回答
老娘就宠你
2楼-- · 2019-02-16 14:01

In Xcode 7 if you apply an extension that is uppercase like .PNG or .JPG, you will get a warning related to 'invalid extension'.

This problem is .PNG, turning it to lowercase can fix this warning on image files like .jpg and .png.

Hope that helps!

查看更多
Summer. ? 凉城
3楼-- · 2019-02-16 14:02

Try changing Default@2x.png instead of Default@2x.PNG.

查看更多
闹够了就滚
4楼-- · 2019-02-16 14:08

Can't comment, yet found this helpful:

After renaming the image's extension name to lowercase the warning goes away (as explained in the accepted answer: .PNG -> .png)

If the warning doesn't go away, clean the project by going to Product -> Clean

(or just: Shift + CMD + K)

查看更多
Lonely孤独者°
5楼-- · 2019-02-16 14:09

If you have the file Image.PNG, convert it into Image.png, and if you have the file extension Image.JPG, convert it into Image.jpg.

Make sure your images have extension with lowercase letters, not capital letters. Hope this will help!

查看更多
登录 后发表回答