-1

In my manifest few intent-filter used but i removed all intent filter except laucher but still two icons. Is there any other reason for two icons?

I am editing this post and also adding my app build.gradle as well project build.gradle

This my manifest

<uses-feature
        android:name="android.hardware.camera"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.camera.autofocus"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.camera.flash"
        android:required="false" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:largeHeap="true"          
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:replace="android:icon">
        <activity
            android:name=".activity.SplashActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustResize|stateHidden">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".activity.user.LoginUserActivity"
            android:windowSoftInputMode="adjustResize|stateHidden" />

    </application>
UnityTaru
  • 81
  • 2
  • 11
  • I solved this issue from https://stackoverflow.com/questions/6028695/android-icon-been-duplicate-when-i-install-my-app-on-the-device I went to this path /build/intermediates/manifests/debug/AndroidManifest.xml and found that there is two Lancher. – UnityTaru Feb 26 '19 at 09:39

4 Answers4

1

I solved this problem from this link

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

I went to this path /build/intermediates/manifests/debug/AndroidManifest.xml and found that there is two LAUNCHER.

UnityTaru
  • 81
  • 2
  • 11
0

In manifest you are using two icons like icon and roundIcon.Hence you are getting two icons maybe.

<application
    android:allowBackup="true"
    android:icon="@drawable/app_icon" //app icon
    android:label="@string/app_name"
    android:largeHeap="true"
    android:roundIcon="@drawable/app_icon" ---> //another app icon
    android:supportsRtl="true"
    android:theme="@style/AppTheme"
    tools:replace="android:icon">

try to remove any one.

Brahma Datta
  • 1,102
  • 1
  • 12
  • 20
0

1) If icon problem

Possibility 1

Check your all drawable(mdpi,xdpi,xxhdpi,xxxhdpi etc...) folders that icon is same or not with same name

Possibility 2

If you use any libraries or module, change name of that icon from app_name to any other.

2) if launcher problem

If it is launcher problem so uninstall all application from your device. Make sure only one launcher activity in your Manifest and run again.

Sohel S9
  • 246
  • 1
  • 15
  • @ Shel S9 everything was fine as u mentioned above. – UnityTaru Feb 26 '19 at 09:41
  • I solved this issue from stackoverflow.com/questions/6028695/… I went to this path /build/intermediates/manifests/debug/AndroidManifest.xml and found that there is two Lancher. – UnityTaru Feb 26 '19 at 09:41
0

You are having two icons mentioned in the application manifest, see this:

<application
        android:allowBackup="true"
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:roundIcon="@drawable/app_icon"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:replace="android:icon">

Try to remove the roundIcon. Hope this will work. If it doesn't works, also replqce the tools:replace="android:icon" with this: tools:replace="icon"

But don't forget to declare your manifest header like this

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.yourpackage"
    xmlns:tools="http://schemas.android.com/tools">
Gourav
  • 2,746
  • 5
  • 28
  • 45
  • i tried both the process u said but the result is same – UnityTaru Feb 26 '19 at 06:59
  • I solved this issue from stackoverflow.com/questions/6028695/… I went to this path /build/intermediates/manifests/debug/AndroidManifest.xml and found that there is two Lancher. – UnityTaru Feb 26 '19 at 09:40
  • But you have to accept one of the answers to your question. Check out the answer that helped you the most, and accept it. You can also add your own answer so that others get help. – Gourav Feb 26 '19 at 13:40