ionic cordova splashcreens / icons

懵懂的女人 提交于 2020-01-01 05:52:09

问题


I'm designing an app with ionic framework for iOS and Android. I configured splashscreens and icons but I still have default Cordova splashscreens and icons when I run the app on my phone (using ionic run android) or run on the iOS Simulator (using ionic emulate ios)

Is this normal or are my images badly configured?

Thank you!


回答1:


To generate icons check out https://github.com/AlexDisler/cordova-icon

It automatically generates all the icons you need for cordova projects for both ios and android and copies them to the right folders.

You can also set it up as a hook to run automatically on every build.




回答2:


Discover this new tool by Ionic for generating splash screens and icons : http://ionicframework.com/blog/automating-icons-and-splash-screens/




回答3:


When we added our icon/splash image then we should insure that icon image's minimum dimensions should be 192x192 px, and should have no rounded corners. And splash image's minimum dimensions should be 2208x2208 px.




回答4:


Following the changes for ionic android app icons.

Go to your project directory - /resources/android/icon/add your icons here as per required size and names below.

drawable-hdpi-icon.png - 72*72

drawable-ldpi-icon.png - 36*36

drawable-mdpi-icon.png - 48*48

drawable-xhdpi-icon.png - 96*96

drawable-xxhdpi-icon.png - 144*144

drawable-xxxhdpi-icon.png - 192*192

As well add the icons in the below directory if it's needed - project directory-/platforms/android/res/place the above icons as per specific folder.

And run the below terminal commands it'll update your icons same way you can manage your splash screen as well.

$ionic build android

$ionic run android



来源:https://stackoverflow.com/questions/24509578/ionic-cordova-splashcreens-icons

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