Oreo 8.0/8.1 中不显示启动器图标

Launcher Icon is not Shown in Oreo 8.0/8.1

Explanation:

I have a working app in google play market. Everything works fine in android versions from 4.0-7.0.

Case:

When the client downloaded it on his Android 8.0 (Oreo) a launcher icon did not seem to show instead android's default launcher icon is showing!!

Question:

Anyone who has encountered such issue? I need any hints to solve it since it seems weird because I have all 4 typed .png icons in mipmap folder.

是的,我在 Android Oreo 中也遇到了同样的问题。

1) Add your images by adding in Image Vector

我遇到了同样的问题,请确保您已将 drawable 或 mipmap 设置为 icon attribute 以及 roundIcon 属性 在你的 Manifest 文件中的 application 标签下

<application
    android:icon="@drawable/ic_launcher"
    android:roundIcon="@mipmap/ic_launcher_round">

</application>

这可能会解决某人的问题。谢谢

使用图像资源工具中的 .png 图像生成启动器图标。

这可能不是理想的解决方案。但是删除名为 mipmap-anydpi-v26 的目录将解决问题,如果你在相关文件夹中有正确的图标。

None 之前的答案对我有用。我发现我的项目有一个文件 app/src/main/res/drawable-v24/ic_launcher_foreground.xml 而另一个项目没有。这就是另一个项目 did 在 Android 8 中有一个图标而这个项目没有的原因。当我删除 drawable-v24 文件夹时,我的图标又回来了!

Android -> Project -> App - > src -> res

right-click on res then -> new -> image asset -> inside add image set as your logo ratio

尝试重启您的手机并在设备上安装应用程序