Reputation: 367
I am using react native version 0.58.
I replaced my app icons with default ic_launcher.png in all mipmap folders.But app icon is still default android icon.I am sure that my png sizes are right for corresponding mipmap folder.
thanks
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.cekilissepeti">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission tools:node="remove" android:name="android.permission.READ_PHONE_STATE" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
Upvotes: 12
Views: 14754
Reputation: 333
Go to: android>app>src>main>AndroidManifest.xml
and rename ic_launcher_round
and ic_launcher
with the new_icon_name
and new_icon_name_rounded
Example:
android:icon="@mipmap/new_icon_name"
android:roundIcon="@mipmap/new_icon_name_rounded"
Upvotes: 0
Reputation: 11
I was running into this same issue, with a similar AndroidManifest.xml
to you, having used yo
and generator-rn-toolbox
to generate @mipmap/ic_launcher
files.
However, since Android was using round icons, and the yo
tool only generated ic_launcher
and not ic_launcher_round
files, I had to update the following value in AndroidManifest.xml
and delete the @mipmap/ic_launcher_round
files.
android:roundIcon=”@mipmap/ic_launcher”
Hope this helps.
Note: it is not best to use square images for round icons. In my case, I am waiting for this PR to be merged so generator-rn-toolbox
can generate round icons as well as square.
Upvotes: 1
Reputation: 1669
I am using react-native
version 0.68.2
and my app icon was showing abnormal
Solution Worked for me:
adroid->app->src->main->res
Enjoy!
Upvotes: 1
Reputation: 449
If you're using MIUI on your phone you need to switch your theme. See https://stackoverflow.com/a/15529525/15609577
Upvotes: 2
Reputation: 3147
Check if there is icons in android/app/src/debug/res
Some auto icon-generator tools throw icons in all android flavors
If you found icons there delete them, you should have only one place for icons under the /main/res
folder
Upvotes: 2
Reputation: 161
I had to delete 'mipmap-anydpi-v26' from app/src/main/res folder which contained two xml files, one each, for both the normal icon, and the rounded icon.
Upvotes: 12
Reputation: 303
I had to rename the files to something different than ic_launcher_round
and ic_launcher
,
then I updated the AndroidMaifest.xml
:
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/launcher_new_name"
android:roundIcon="@mipmap/launcher_new_name_round"
Upvotes: 6