'How to add app icon properly in android react-native

Hi I added icons to android/app/src/main/res/..., the app icon showing perfectly in home screen like first image, but when minimize the app it showing default app icon like second image. how can change that icon also. I cleaned build folder, gradlew and reinstalled the app but no changes. Please help me on this

enter image description here

enter image description here

enter image description here



Solution 1:[1]

put this on AndroidManifest.xml and try

<application
      ...
      android:icon="@drawable/ic_launcher"
      ...
</application>

also hope you update the icons properly. please refer this https://code.tutsplus.com/tutorials/how-to-update-the-launcher-icon-for-your-android-app--cms-30624

Solution 2:[2]

I'm not sure if this comes after you setup androidManifest.xml but you will need icons in these two folders:

  • android/app/src/main/res/mipmap.
  • ios//Images.xcassets/AppIcon.appiconset

I've used the resize-reactnative-launcher-icon shell scrip to generate my icons. It takes a png image and creates the 25 variations you need by size and resolution.

bash resize.sh my-cool-new-app-logo.png

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 codehesh
Solution 2 Lucas S.