Android launcher icon still showing default in Android Oreo [duplicate]
Asked Answered
C

7

18

I changed my application launcher icon using Android Studio 3.0.1:

File -> Image Asset

In Android 8.1, the icon looks like below image:

enter image description here

My AndroidManifest details

 <application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:hardwareAccelerated="true"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

I double checked the icons.ic_launcher and ic_launcher_round are my new icons.

Choragus answered 6/2, 2018 at 9:52 Comment(3)
What I understood is that you are replacing default ic_launcher to your icon?? And while replacing this icon the launcher icon still shows its default icon. Am I right??Hiett
@Hiett yes,I replaced icon with the help of android studioChoragus
For some weird reason i am having same issue. I used legacy option to update launcher icons. Checked i don't have any default icon in my project. New icon is shown in the launcher but recent tray and settings still show default icon.Connivent
C
7

I solved my issue by changing

classpath 'com.android.tools.build:gradle:2.3.3'

to

classpath 'com.android.tools.build:gradle:3.0.1'

in project build-gradle

dependencies {
        //classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.android.tools.build:gradle:3.0.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

this will cause a flavoring issue ,that can be solved by adding

flavorDimensions "default"

in application build-gradle

android {

...
flavorDimensions "default"
defaultConfig {
}


}

this may help some one with same problem.

Choragus answered 7/2, 2018 at 9:46 Comment(1)
This causes a build break with Android Studio 3.4.1 where classpath is not recognized.Otha
S
14

Best solution is delete mipmap-anydpi-v26 folder then app will take default icon. In android studio Project mode go to this package

res/mipmap-anydpi-v26

delete it and rebuild and Run program.

Strasbourg answered 21/12, 2018 at 6:59 Comment(1)
Deleting the mipmap-anydpi-v26 isn't the best solution. It just avoid the issue which the OP doesn't have the right files to support new feature introduced in 8.0 (API 26). His project contains not only his icon (ic_launcher for up to 7.0, ic_launcher_round for 7.1), but also new and default ic_launcher_background and ic_launcher_foreground under drawable.Ballon
C
7

I solved my issue by changing

classpath 'com.android.tools.build:gradle:2.3.3'

to

classpath 'com.android.tools.build:gradle:3.0.1'

in project build-gradle

dependencies {
        //classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.android.tools.build:gradle:3.0.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

this will cause a flavoring issue ,that can be solved by adding

flavorDimensions "default"

in application build-gradle

android {

...
flavorDimensions "default"
defaultConfig {
}


}

this may help some one with same problem.

Choragus answered 7/2, 2018 at 9:46 Comment(1)
This causes a build break with Android Studio 3.4.1 where classpath is not recognized.Otha
G
6

You Need Put Round Icon for 8.1

 <application
    android:name=".aaa"
    android:allowBackup="true"
    android:roundIcon="@mipmap/ic_launcher"
    android:icon="@mipmap/ic_launcher"
    android:label="aaa"
    android:theme="@style/AppTheme">
Goff answered 6/2, 2018 at 10:4 Comment(4)
It is already there in manifest android:roundIcon="@mipmap/ic_launcher_round"Choragus
check that it's your app icon or default one.Goff
ic_launcher_round is defult one please check thatGoff
When we import using image assets it automatically replace with our new icon, I double checked the icons in my mipmapChoragus
B
6

I had the same problem - a default icon was showing up in the task switcher. What fixed it for me is removing the round icon from my manifest.

As per the documentation for Adaptive icons,

You must only use the android:roundIcon attribute if you require a different icon asset for circular masks, if for example the branding of your logo relies on a circular shape.

(emphasis mine)

My app does not need a different asset for circular masks - removing the reference to the round icon from the manifest caused Android to show the correct launcher icon in the task switcher.

Bathhouse answered 3/5, 2020 at 6:18 Comment(2)
That worked for me too.Muezzin
This solved it for me, thanks!Predictor
B
2

In Android Studio, use Image Asset to (re)create your icons. On Windows, ctrl+shift+A. On Mac, cmd+shift+A. When you are done, save and overwrite existing files. Then the problem will be fixed.

Most likely you'll provide your own icon and your background color (which will be just a resource in colors). Image Asset will created a set of new ic_launcher_foreground.png. You'll find two set of (now) unused resources: ic_launcher_background.xml (which gives the green background with grid) and ic_launcher_foreground.xml (which gives the Droid head). You can safely remove those files.

Ballon answered 2/4, 2019 at 7:14 Comment(1)
This is the only working solution for me on Android 8.1Otha
B
1

In Android Studio Go to File -> New -> Image Asset -> Then browse your launcher icon which you want to use and click next to finish the process. Try to use 1024x1024 size image or at least 512px . See the picture below for clear understanding.

Step 1: Go to File -> New -> Image Asset

enter image description here

Step 2: Then Choose your launcher image and click next to finish the process it will replace your current launcher image. See the image for other setting also like you must select Icon Type: Adaptive and Legacy

enter image description here

Blockhouse answered 5/8, 2018 at 6:47 Comment(1)
I did and it still picks the default drawable.Otha
T
1

I had the same symptoms, where my imported SVG image would not show up on API 26+, but it turned out to be an issue with the complexity of the source SVG. I opened the SVG in Inkscape, found a particularly complex path in the image then:

Extensions > Modify Path > Flatten Beziers...

As mentioned here: SVG: simplify path to remove curves?

After re-importing the SVG it worked fine.

Tanto answered 17/3, 2020 at 22:5 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.