应用程序图标未设置,它始终显示默认的绿色android图标 [英] App icon not being set, it is always showing default green android icon
问题描述
我按照教程和其他堆栈溢出问题的建议执行了以下步骤:
I have followed the following steps as suggested by tutorials and other stack overflow questions:
- android:icon =@ mipmap / ic_launcher 在应用程序图标命名为ic_launcher的清单中,所有mipmap已根据分辨率进行了适当替换
- 将所有mipmap图像替换为 Android Asset Studio
- 我通过右键单击选择了图像资源中的相应文件res。
- 我已经卸载了旧应用程序。重新安装应用程序然后运行
- 我已经使缓存无效并重新启动了Android Studio
- 重新启动移动设备
- 在图像资源中也添加了512 * 512像素的图像。
- android:icon="@mipmap/ic_launcher" in the manifest where the app icon is named ic_launcher and all the mipmaps have been appropriately replaced on basis of resolution
- replaced all mipmap images with the the images generated from Android Asset Studio
- I have selected the appropriate files in the image asset by right clicking on res.
- I have uninstalled the old app. Rebuilt the app the ans then run
- I have invalidated cache and restarted Android Studio too
- Restarted the mobile
- Added a 512 * 512 pixel image in image asset too.
我怀疑的问题是当我启动图像资源时默认值是剪贴画而不是图像。因此,每次运行应用程序时,它都可能会获取默认的剪贴画图标。
The problem I suspect is that when I launch the image asset, the default is on clipart and not on image. So everytime the app is run it may be picking up the default clipart icon.
我还在工具栏中保留了应用图标。这有时会改变。如果应用程序再次运行,它将更改回默认的绿色android图标。
I have also kept the app icon in the toolbar. This changes sometimes. If the app is run again it changes back to the default green android icon.
我有新的android studio 2.1。那么这方面有问题吗?
I have the new android studio 2.1. So is there some problem with it in this regards?
推荐答案
在清单中:
android:icon="@drawable/ic_launcher"
android:logo="@drawable/ic_launcher"
在drawable文件夹中,我添加了名为ic_launcher的徽标,其大小为192 * 192像素。
In the drawable folder, I added my logo named ic_launcher having size 192*192 pixels.
此解决方案让我走上正轨。
这篇关于应用程序图标未设置,它始终显示默认的绿色android图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!