Android启动图标不工作图标、工作、Android

2023-09-06 18:15:01 作者:森很绿却致人迷途

我有我目前正在开发Android应用程序。我创建的图标文件(.png),放在在 / RES /绘,华电国际(和LDPI&安培; MDPI)的文件夹。在我的清单我有

I have an Android app that I am currently developing. I have created icons (.png) and placed them in the /res/drawable-hdpi (and ldpi & mdpi) folders. In my manifest I have

<application android:icon="@+drawable/icon" android:label="@string/app_name">

我的图标都被​​命名的icon.png。

my icons are all named icon.png.

我已经编译源,当我在模拟器上运行,该图标在桌面启动器显示出来。但是,当我的APK复制到我的实际电话,桌面启动器显示默认包图标,而不是我的自定义图标。虽然,够有趣,当我实际安装应用程序,该程序包管理器显示的图标。但是,一旦它被安装,该图标不显示。

I have compiled the source and when I run it on the emulator, the icon shows up in the desktop launcher. But when I copy the apk to my actual phone, the desktop launcher shows the default package icon rather than my custom icon. Although, funny enough when I am actually installing the app, the package manager does show the icon. But once it is installed, the icon does not show.

如何让我的应用程序图标显示为启动器图标?

How do I make my application icon show up as the launcher icon?

跳过

推荐答案

删除+,在@ +绘/图标

remove the "+" in "@+drawable/icon"