类型:漏洞
平台:移动端webview
我尝试使用博客/网站教程中的 ionic splash 和图标生成器。它不会读取我的 png 文件,即使我将它们放在根目录中。我将它们转换为 ai 文件,它们会返回一个错误,指出无法读取文件(尽管它们可以在预览和 Adobe Illustrator 中打开)。
然后我使用了 cordova 生成器指令并得到了这个错误:
{ [Error: Command failed: convert: unable to open image platforms/ios/splash/Resources/icons/icon-72@2x.png': No such file or directory @ error/blob.c/OpenBlob/2675. convert: WriteBlob Failedplatforms/ios/splash/Resources/icons/icon-72@2x.png' @ error/png.c/MagickPNGErrorHandler/1630. ] timedOut: false, killed: false, code: 1, signal: null }
最佳答案
如果您使用的是最新版本的 Ionic-CLI,应该可以正常运行。
npm update -g ionic
更新您的cli。
创建项目后,您必须添加一个平台:
ionic platform add android
ionic platform add ios
在项目的根目录中,您应该找到一个名为resources
的文件夹。
放置一个图标文件和一个闪屏文件:
- 图标.png
- splash.png
The icon image's minimum dimensions should be 192x192 px, and should have no rounded corners.
现在,从项目的根文件夹:
ionic resources
它应该为定义的所有平台创建资源。
关于android - 漏洞 : Splash and Icon generator not working (Ionic and Cordova),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30532379/