开发者

Android icon doesn't appear

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.

Somethin开发者_运维百科g 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?


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.


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.


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜