简体   繁体   English

Android,为什么启动器图标和其他图像在我更新图像时永远不会改变?

[英]Android, Why launcher icon and other images never change when I update my images?

I released one version of my application. 我发布了一个版本的应用程序。 For this version I had an image for launcher icon. 对于这个版本,我有一个启动器图标的图像。 For next version (update), I replaced this icon with other image. 对于下一个版本(更新),我将此图标替换为其他图像。

My problem is when I update last version with new one, new launcher icon doesn't display and old one is still displaying. 我的问题是当我用新的版本更新上一版本时,新的启动器图标不显示而旧版本仍在显示。

However, if I clear data before uninstall and after that uninstall then by installing new version I can see new launcher image. 但是,如果我在卸载之前和卸载之后清除数据,那么通过安装新版本我可以看到新的启动器图像。 The problem is I cannot ask all customers one by one please clear data and then uninstall before updating to new version. 问题是我无法逐一询问所有客户请清除数据然后在更新到新版本之前卸载。

What is the solution? 解决办法是什么?

I have changed launcher icons for my apps several times, and have no problems with it (user base is few millions users). 我已经多次更改了我的应用程序的启动器图标,并且没有任何问题(用户群是几百万用户)。 You have nothing to do in your source code, just replace your .png file in res folder and rebuild your project. 您在源代码中无关,只需替换res文件夹中的.png文件并重建项目即可。

Note: if you are building final .apk using some IDE (Eclipse, IntelliJ IDEA, etc.) do not forget to refresh and make a full clean of your project before building it. 注意:如果您使用某些IDE(Eclipse,IntelliJ IDEA等)构建最终的.apk ,请不要忘记在构建项目之前刷新并完全清理项目。

Please check you have mention the icon in the manifest 请检查您是否在清单中提到了图标

<application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
</application>

I have the same issue when i was not added the icon in the application tag. 当我没有在应用程序标签中添加图标时,我遇到了同样的问题。 but it got resolve after add the icon in the application tag 但在应用程序标记中添加图标后,它得到了解决

It should be as easy as replacing the image, but sometimes it doesn't work on eclipse. 它应该像替换图像一样容易,但有时它不适用于日食。 I solved it just deleting the old icon launcher (all versions mdpi,hdpi...) and then pasting the new ones with a different name. 我解决了它只是删除旧的图标启动器(所有版本mdpi,hdpi ...),然后用不同的名称粘贴新的。

Maybe it is not your case, but it was my case, and it could be for another one. 也许这不是你的情况,但这是我的情况,也可能是另一个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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