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,043
  • 12
  • 40
  • 63

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
  • 2,092
  • 5
  • 26
  • 38
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,864
  • 2
  • 17
  • 35