简体   繁体   中英

Android icon wrong in App Management app, but correct in Launcher

I have a simple Android app (built with Mono for Android), which has a problem with it's icon.

  • The icon is correct in Launcher and in Task Switcher, but
  • In Manage Apps and in Task Manager it's displayed a generic Android icon

I've checked the various density resources and the manifest and they all look correct.

(I'm seeing this on a Galaxy S phone and on a Nexus 7)

您很可能在AndroidManifest.xml为活动设置了icon属性,但没有为应用程序设置它。

Oleg and Collin are both right but for completeness - in a Mono app the icon can be set with attributes on the Application object (if you have one):

[Application(Label = "MyAppName", Icon = "@drawable/icon")] 
class MyApp: Application
{ ...

It occurs to me, that the app icon is somehow being cached in the app manager, so that deinstalling and reinstalling the app does not always change the icon properly. Rebooting the device could help. Also i found this post very useful: adding application ids in gradle usually solves the problem.

Open "AndroidMenifest.xml" in the Package Explorer and click on the "Application" tab at the bottom. Look at the "icon" field and enter the location for your icon ( Ex: @drawable/iconimage ). Next, go into the "AndroidManifest.xml" tab and look for android:icon= , adding the location to that as well (Ex: android:icon="@drawable/iconimage )

Make sure you have the same icon name in both locations!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM