我的测试设备是Android 6.0。它对所有的应用程序都使用圆形图标(除了我的)。因为这是唯一的测试设备,而且我的手机不使用圆形图标,所以我必须让它在测试设备上工作。
我试图让它显示一个圆形的图标,但到目前为止我还没有成功。
我已经将所有的ic_launcher_round图片设置为不同的分辨率。我还为"ic_launcher_round.xml“文件创建了一个"app_icon_round”图片。所有的ic_launcher_round图片都是合适的大小等。我已经检查过很多次了。
ic_launcher_round.xml:
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/app_icon_round" />
</adaptive-icon>AndroidManifest.xml,:
<application
...
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
...
</application>我总是使用Android Studio安装它。我注意到,当我在闪屏上工作时,我需要手动卸载应用程序,重新启动手机,然后通过Android Studio安装它才能注意到变化。
我想我漏掉了一些次要的东西,但不知道是什么。我在网上看到的答案没有提到我没有做的事情。
发布于 2019-04-10 20:15:47
一个Android6.0设备会显示你的@mipmap/ic_launcher图标。如果你想让你的启动器图标在Android6.0上是圆形的,那就让@mipmap/ic_launcher变成圆形。
android:roundIcon仅在安卓7.1上使用,自适应图标仅在安卓8.0+上使用。
https://stackoverflow.com/questions/55612237
复制相似问题