xcode 压缩构建设置中缺少的 Png 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33082838/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Compress Png Files missing from build settings
提问by Swinny89
I am building an app which has quite a few images in, therefore I have crushed them all using ImageOptim to help decrease the size of my .IPA. How ever the size of my app has not changed at all.
我正在构建一个包含相当多图像的应用程序,因此我使用 ImageOptim 将它们全部粉碎以帮助减小我的 .IPA 的大小。我的应用程序的大小根本没有改变。
I have looked on their website and they say to turn off Compress Png Files
in the Build Settings under Packaging. However that option is not there. I have tried manually adding it into my project.pbxproj but it gets listed under the User Defined section and does not turn it off.
我查看了他们的网站,他们说要Compress Png Files
在 Packaging 下的 Build Settings 中关闭。但是,该选项不存在。我尝试将它手动添加到我的 project.pbxproj 中,但它被列在“用户定义”部分下并且没有将其关闭。
I have also tried searching in the Build settings (My main target is selected).
我还尝试在构建设置中搜索(选择了我的主要目标)。
So my question is... how can I add Compress Png Files
into my build settings?
所以我的问题是......我如何添加Compress Png Files
到我的构建设置中?
回答by Arthur Gevorkyan
It might sound mind blowing, but please read it to the very end.
这听起来可能令人兴奋,但请阅读到最后。
- Try dragging and dropping a dummy png file to your project navigator, then select like "Add, Copy if Needed" and the option will appear in the Packaging section. But, I guess, this is not your case.
- It looks like you have all your png's contained in an asset catalog rather that just lying around. For that case, I guess, you might want to play around with this:
回答by Nilesh
You need to Just Search in Build Setting png
And CopyPNG File - Packaging is Searched And The Section Have Option is Compress Png File
is The Default value is Yes
You will change value NO
it Means your png Files is Compressed Bellow is the Screen Shot
您只需要在构建设置png
和 CopyPNG 文件中搜索 - 搜索包装并且该部分有选项是Compress Png File
默认值是Yes
您将更改值NO
这意味着您的 png 文件被压缩波纹管是屏幕截图
回答by jorjj
If you change the format of the file to png, the error shows up all the time for the assets when you try to use it. It's better to find the original png file or save the file as a png file with an image editor.
如果您将文件的格式更改为 png,则在您尝试使用资源时始终会显示错误。最好找到原始的png文件或用图像编辑器将文件另存为png文件。