chrispsv
chrispsv

Reputation: 435

Android launcher icon only appears in the emulator

I'm trying to add a launcher icon to my android app. I have watched multiple tutorials online that explain how that works. I ended up doing it this way: https://www.youtube.com/watch?v=DQ8HDL-X9rM

The laucher icon does appears in the android simulator but not on physical phones. what I have tried to do:

that were the tips that showed up in a stackoverflow topic a couple years back. I have been working on it for the passed week and I just can't get it to work.

This is my ic_launcher.xml

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
   <background android:drawable="@color/ic_launcher_background"/>
   <foreground android:drawable="@mipmap/ic_launcher"/>
</adaptive-icon>

And this is this are the lines in my AndroidManifest

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"

        <activity android:name="com.example.fragments.Product">
           <meta-data
              android:name="android.support.PARENT_ACTIVITY"
              android:value="com.example.MainActivity" />
        </activity>
        <activity android:name="com.example.MainActivity">
           <intent-filter>
              <category android:name="android.intent.category.LAUNCHER" />
              <action android:name="android.intent.action.MAIN" />
           </intent-filter>
        </activity>
    </application>

Also I checked all the mipmap folders and all my icons are in there with the correct names.

Does anyone know what I can do?

---update june 3---

Now its not even showing up on the emulator anymore... I have tried and read all the topics online I really hope someone can spot what I do wrong

Upvotes: 0

Views: 695

Answers (1)

Elango
Elango

Reputation: 422

You can simple way to add icon for app

go to project app->res->drawable->right click->new->image asset-> source asset select image path and click to next button RUN the app

another way

Upvotes: 2

Related Questions