Skip to content Skip to sidebar Skip to footer

Declare Intent In Manifest File

I have declared a intent to access another layout on a button click, When it was run I getting following error, android.content.ActivityNotFoundException: Unable to find explicit

Solution 1:

you need to declare your activity in android manifest.xml here is an example:

<?xml version="1.0" encoding="utf-8"?><manifestxmlns:android="http://schemas.android.com/apk/res/android"package="your.package.name"><applicationandroid:icon="@drawable/icon"android:label="@string/app_name"><activityandroid:name=".Activity1"android:label="@string/app_name"></activity><activityandroid:name=".Activity2"></activity></application><uses-sdkandroid:minSdkVersion="4" /></manifest>

Solution 2:

u missed some like .helloListView in manifest, even check for the dot.

<activityandroid:name=".helloListVeiw"android:label="@string/app_name"><intent-filter><actionandroid:name="android.intent.action.MAIN" /><categoryandroid:name="android.intent.category.LAUNCHER" /></intent-filter></activity>

Post a Comment for "Declare Intent In Manifest File"