Android, icon been duplicate when i install my app on the device

前端 未结 6 925
遥遥无期
遥遥无期 2021-01-21 19:54

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?

相关标签:
6条回答
  • 2021-01-21 20:09

    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.

    0 讨论(0)
  • 2021-01-21 20:10

    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

    0 讨论(0)
  • 2021-01-21 20: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.

    0 讨论(0)
  • 2021-01-21 20:24

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

    0 讨论(0)
  • 2021-01-21 20:28

    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"

    0 讨论(0)
  • 2021-01-21 20:31

    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.

    0 讨论(0)
提交回复
热议问题