Android icon doesn't appear

安稳与你 提交于 2019-12-11 11:45:13

问题


I'm using one Eclipse project to generate 2 apks (one is the free version of my app, the other the paid version).

What I do before compiling one or the other is just modify the AndroidManifest file (change the package name), then modify my config file, and select Android Tools -> Export ...

However only one of the two apk's I generate end up with the correct icon for the application.

Something interesting is that the icon is used inside the app, and in both apps is seen ok. Its just the app icon that sits on the "desktop" of the phone that shows the "default" Android icon.

Any ideas?


回答1:


To be visible in the launcher your main activity should declare this intent-filter:

<intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

Maybe you've removed it while editing your Manifest file, you should check it. Hope this helps.




回答2:


Please make sure that you don't have different icon.png files (or whatever you named your icon file) in the different drawable folders. Make sure that your icon file is identical (Except the resolution) in the drawable, drawable-hdpi, drawable-mdpi, drawable-ldpi or whatever drawable folders you're using.

I assume that one of them has the default icon in one of the folders.




回答3:


I believe what was happening was that the Astro file manager would cache the app icons. Since I copied to the phone a new app version with the same filename as an older one, it would keep the old icon. Thanks everyone!



来源:https://stackoverflow.com/questions/7172595/android-icon-doesnt-appear

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!