Ionic app icon not change in android

2019-04-09 10:29发布

I have project in ionic, I already set icon using ionic CLI.

In iOS the icon is changed, but in android its not changed.

Here is my config.xml:

<platform name="android">
    <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
    <icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
    <icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
    <icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
    <icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
    <icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
    <splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
    <splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
    <splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
    <splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
    <splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
    <splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
</platform>

I checked plaftorm/android/res but icon and splashscreen are not changed.

I delete and re add the platform but it has no effect.

EDITED:

I sure image exists in resources directory and like I said before i already use ionic CLI command ionic resources

this my resources icon file this icon in platform ios file3 and this icon in platform android file2

1条回答
时光不老,我们不散
2楼-- · 2019-04-09 11:19

It's a cordova issue. https://github.com/driftyco/ionic-cli/issues/1608 Uninstall cordova(6.4.0) and downgrade it to 6.3.1

npm uninstall -g cordova npm install -g cordova@6.3.1

After that remove the Android platform and add it again.

查看更多
登录 后发表回答