Clearing the cache files: This is a very common reason cited by many users. They can even disrupt the icon files leading to showing duplicate ones. To fix it, Go to Settings, click on manage Apps and search the app that is causing the most trouble. Open the App then click on Clear data.
android - Two launcher activities - Stack Overflow.
At the simplest level, there are two different ways for apps to interact on Android: via intents, passing data from one application to another; and through services, where one application provides functionality for others to use.
Your manifest file should only have this line in the activity you want to have an icon:
<category android:name="android.intent.category.MAIN" />
Based on your description, it sounds like both activities have this line.
In your mainfest file when you have following tag in two different activities tags at the time, Android app seems to be installed twice.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
The comment made by @Adrian C on his answer solved our problem.
The manifest file of our main application had only one intent-filter
tag specifying only one activity as the launcher activity for the application.
So I had to look deeper...
We included library projects (luckily written by us) and the manifest file of one of the library projects had an intent-filter
tag on its activity specifying that activity as the launcher activity.
When we then included that library project in our main application (which has its own intent-filter
specifying a launcher activity), the complete source code saw two intent-filter
tags specifying two activities as launcher activities and therefore two application icons were created.
When we removed the intent-filter
specifying a launcher activity in the library project, the second app launcher icon disappeared.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With