Reputation: 4972
Android icon is no longer seen on device. (seeing default android icon instead)
I'm using the following command as always: react-native run-android --variant=release
,
Today I've been getting errors while trying to run the app figuring out I was needed to add multiDexEnabled
to my build.gradle
file.
the icons files still exist under the mipmap
directory.
build.gradle
:
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "xxx"
minSdkVersion 16
targetSdkVersion 27
versionCode 14
versionName "0.2.3"
multiDexEnabled true <------- This one is new
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
AndroidManifest.xml
:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="oauthlogin" android:host="login" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
</application>
I'm seeing the default android icon instead of my own @mipmap/ic_launcher
. And I have no lead on how to fix this.
Upvotes: 0
Views: 31
Reputation: 307
Try to put your icon in drawable folder and also change the icon name like @drawable/app_icon
May it will work for you
Upvotes: 1