Have you ever loaded up an application, ready to debug, but then seen a message along the lines of, "Application Not Installed" display? This usually has an accompanying LogCat error:
ActivityManager: java.lang.SecurityException: Permission Denial: starting IntentThe cause and solution are very simple:
- This error is most likely caused by a duplicate Activity class entry in the manifest file.
android:name=".MainActivity"
android:label="@string/app_name">
android:name="android.intent.action.MAIN" />
android:name="android.intent.category.LAUNCHER" />
android:name="MainActivity">
The solution should be clear by now:- Remove the duplicate
tag from the AndroidManifest.xml file - Build the application again
- Reload the application
This is quite the opposite of forgetting to add an Activity class to the manifest file. And, yet, it leads to a failure just the same. Proper maintenance of the manifest file is important. It's not a file to mess around with.
Happy Android Coding!


05:00
MAHA BLOG
0 comments:
Post a Comment