如果您的目标 SDK 为 26,android 设备版本为 8,则应用图标将是圆形的。
实现这一目标的方法之一是(不确定这是否是正确/最佳的方法)
在 AndroidManifest.xml 我必须设置
android:targetSdkVersion="20"</p>
<uses-sdk android:minSdkVersion=“16" android:targetSdkVersion=“20” />
android:roundIcon=“@mipmap/ic_launcher_round”</p>
<application android:hardwareAccelerated=“true” android:icon=“@mipmap/ic_launcher” android:label=“@string/app_name” android:roundIcon=“@mipmap/ic_launcher_round” android:supportsRtl=“true”>
确保 ic_launcher_round 图像是平方的。
我使用 android studio 来生成自适应和遗留图标……
我删除了android studio生成的ic_launcher_round图像。
我将 ic_launcher 图像(通常是方形图标)复制到 ic_launcher_round。
现在我的 ic_launcher_round 是 Squared 图标。
(ic_launcher_round.png, ic_launcher.png, icon.png) 它们都是相同的图像
进行此更改后,重新构建应用程序。现在,当您安装应用程序时,您应该会看到方形图标。