我刚刚使用Image Asset Studioandroid工作室将我的应用程序图标转换为与android o的自适应图标兼容
当我在运行API 25的设备上运行我的项目时,我得到默认的绿色android图标而不是我的图标.
这是我的表现
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:allowBackup="false"
android:roundIcon="@mipmap/ic_launcher_round"
tools:replace="allowBackup"
tools:ignore="GoogleAppIndexingWarning">
Run Code Online (Sandbox Code Playgroud)
这些是图像资产工作室创建的文件
这只是一个Android Studio错误还是我错过了什么?
我的测试设备是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>
Run Code Online (Sandbox Code Playgroud)
AndroidManifest.xml,:
<application
...
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
...
</application>
Run Code Online (Sandbox Code Playgroud)
我总是使用 Android Studio 安装它。我注意到当我在启动屏幕上工作时,我需要手动卸载应用程序,重新启动手机,然后通过 Android Studio 安装它以注意更改。
我想我错过了一些小事,但不知道它是什么。我在互联网上看到的答案没有提到我没有做的事情。