Android图像资源(图标)在某些手机上无法显示

5

我已经添加了一个新的图像资产到我的构建中,在虚拟和物理设备上进行了测试,然后将其作为Beta版本推送到Play Store。在我的端上一切都正常,但是我的一个测试人员说应用程序图标没有显示出来!他使用的是运行Android 8.0的Google Pixel手机。有人知道可能是什么原因吗?

2个回答

4

Android Oreo(安卓奥利奥)需要几个不同版本的图标,并且您需要创建自适应图标(Adaptive Icon)


0
1. Select app folder from your project
2. Select File → New → Image Asset
3. On "Foreground Layer" choose the path of your image and resize in order to get the proper aspect for the icon
4. On “Background Layer" use the provided background color
5. Click on Finish and mipmap icons are created in different sizes

In your manifest file do the following changes


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

来源:如何为Android创建自适应图标


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接