Android, icon been duplicate when i install my app

2020-04-16 01:28发布

I try to install the app that i develop on my device (Htc desire) and i see that the icon of the app is duplicate

what i need to change to don't late that happen?

how could i delete one of the icon?

Thanks for helping!!

标签: android
6条回答
冷血范
2楼-- · 2020-04-16 01:55

I came up this issue today, I am using Gradle.

I found out there was a folder ./build/manifests/debug/AndroidManifest.xml was generated from gradle build, and it had duplicate intent-filter of category launcher.

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

...

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

One of it was came by gradle dependencies compile project. So I went back and check dependencies project and remove it, and the problem solved.

查看更多
▲ chillily
3楼-- · 2020-04-16 01:59

try to use this ,

<intent-filter>
    <action android:name="android.intent.action.(your action )" />
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

and you have to use ur main activity

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

let me comments if any issue.

查看更多
疯言疯语
4楼-- · 2020-04-16 02:09

force stop your launcher from settings - app manager and clear cash data of launcher and check your problem is resolved

查看更多
疯言疯语
5楼-- · 2020-04-16 02:15

do you use the default icone of android , or u have change the app's icon from the manifest ?

if that's right , try using the default icon of android , and then see if that will duplicate the app's icon or not

查看更多
仙女界的扛把子
6楼-- · 2020-04-16 02:18

for change icon of app..

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

see this line in your menifest file.. and change "@drawable/your_icon_name" instead of "@drawable/icon"

查看更多
够拽才男人
7楼-- · 2020-04-16 02:18

Android's Launcher app creates an icon for each Activity in your Application that includes the intent filter android.intent.category.LAUNCHER.

Remove this intent filter from all Activities that should not be launched. In other words, define this intent filter in your main Activity, and in your main Activity only.

查看更多
登录 后发表回答