I'm working on an Android app using Eclipse and just started noticing a weird glitch.
When I deploy the app to my phone for some reason multiple app icons appear in my "Apps" folder area. Each icon brings me to a different class page within my app when tapped. Has anyone else experienced this as well?
Here's a screenshot of the issue when running the app from the emulator on my laptop.
Since the issue is appearing in the emulator I know that it isn't my phone that's causing the error.
Each of the icons you see in that screenshot represents a different activity in my manifest file.
Here's how the activity is set up in my manifest.
<activity android:name=".MainJava">
<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.SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".AppClass">
<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.SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Would you say that this error being caused because of the way that I am setting up the activities? If so, how would you suggest that I edit the activities to fix this problem?
I've never seen this in any of the apps I've built before this one.
Only MainActivity(Launcher Activity) have intent filter with action as Main and category as Launcher
,
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
And Remove this Two line For other Activity.
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