Xcode 7 warning: The launch image does not have a valid extension

喜你入骨 提交于 2019-12-13 12:24:52

问题


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?


回答1:


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




回答2:


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!




回答3:


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!




回答4:


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)



来源:https://stackoverflow.com/questions/32632577/xcode-7-warning-the-launch-image-does-not-have-a-valid-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!