1

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 activity class xxxxxx; have you declared this activity in your AndroidManifest.xml?

From this I understood that intent need to be declared in android manifest file but I don't know how to declare.

Can anyone explain me how to declare<

Thanks in advance Siva

Siva
  • 9,159
  • 10
  • 36
  • 59

2 Answers2

2

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

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="your.package.name">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".Activity1" android:label="@string/app_name"></activity>
        <activity android:name=".Activity2"></activity>
    </application>
    <uses-sdk android:minSdkVersion="4" />
</manifest>
Palejandro
  • 1,920
  • 4
  • 23
  • 34
1

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

<activity android:name=".helloListVeiw"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
Sush
  • 3,844
  • 1
  • 15
  • 35