Android Studio app icon

烂漫一生 提交于 2020-01-23 11:52:53

问题


(I've updated the post)

Here's how I have my proyect:

Manifest:

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

Mipmap: Created by New > Image Asset I selected Launcher Icons (Adaptative and Legacy)

Icons

Also, when I open any of them I see the icon I want:

Icon

Now, the launcher icon works just fine:

Launcher Icon

The problem I'm having is that it does not want to update the icon that is displayed when I'm going to select another app.

Problem


回答1:


you have to update both property of application tag in manifest file.

   android:icon="@mipmap/ic_launcher" <-- Change this one
    android:roundIcon="@mipmap/ic_launcher_round" //<-- and this one

or you can remove

android:roundIcon="@mipmap/ic_launcher_round" //<-- and this one

ensure you have place all mipmap/drawable in correct place and for all dpi.

reach me if you have still problems.




回答2:


Go to your app folder and go under drawable. Right Click -> New -> Image Asset.

From there you can select what kind of image you want for the different options given.




回答3:


I think it is a common cache issue. Sometimes when you run the app from Android studio or in debug mode you will have this droid icon.

When you stop and don't reinstall the app, droid icon is still there for futures launches... You have to clear the cache to get back your icon.

I search a correct answer for days because this is very stange and still not fixed...

Hope this will help !



来源:https://stackoverflow.com/questions/47893199/android-studio-app-icon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!