ifeoluwa king
ifeoluwa king

Reputation: 531

Custom Splashscreen and Icon in Ionic 2 not showing, Cordova Icons showing

I don't understand why my icon and splash screen aren't showing. They are properly referenced in the config.xml file but instead it's the cordova default images that show. Please help

EDIT: I just noticed that the icons and splash screens generated were not copied into their respective platforms. Why did this happen?

Upvotes: 8

Views: 13862

Answers (4)

Bryant Makes Programs
Bryant Makes Programs

Reputation: 1694

This issue is caused by the res map not being created in the correct location. Running the following string of commands will remedy your issue.

mv platforms/android/res/{values,xml} res
rm -rf platforms/android/res
cp -r res platforms/android
ionic build android

Upvotes: 3

Tal Bussel
Tal Bussel

Reputation: 116

check out this link: https://github.com/driftyco/ionic-cli/issues/1608 and specifically florentsuc's comment

i solved it by running: ionic platform remove android ionic platform add [email protected]

Upvotes: 8

Eduardo Lazcano
Eduardo Lazcano

Reputation: 41

I had the same problem and this is what I did:

  • Make the icon.png and splash.png and put in resources folder.
  • Run ionic resources command (and automatically ionic made all the files).
  • Run ionic platform remove android.
  • Run ionic platform add android (and the config.xml file was updated).
  • I changed manually the android/res/.../screen.png and android/res/.../icon.png files with the generated before.

And finally my custom icon and splash screen appeared.

In other words you have to update the files manually in platforms/android and platform/ios.

Upvotes: 1

LeRoy
LeRoy

Reputation: 4436

To Modify splash screen you can go to resources folder and modify the icon.png and splash.png

You can run ionic resources command to generate resources for current installed platforms.

It is imperative that you keep icon and splash sizes and format the same or it will not work.

Also make sure you have your platforms installed before doing this:

ionic platform add android

ionic platform add iOS

Splashscreen:

  • You can get a template here
  • 2208x2208 px
  • .png format

Icon:

  • You can get a template here
  • 192x192 px
  • .png format

I also realized its best too keep these images small, as soon as they go higher than 35mb they take longer to generate

Upvotes: 5

Related Questions