Skip to content Skip to sidebar Skip to footer

Android: Activity Not Registered In The Manifest

I used to implement String- & Integer-interfaces with certain constants and values (e.g. 0x00 for "visible"). Unfortunately, Android seems to have trouble with interfaces and activity-classes. Removing the interface and making static references onto the constants made the emulator get rid of the problem.

publicclassMyActivityextendsActivityimplementsOptions// [...]
Btn.setVisibility(VISIBLE); // bad ideapublicclassMyActivityextendsActivity// [...]
Btn.setVisibility(Options.VISIBLE); // good idea

Hopefully this is gonna help at least someone searching for this issue.

Solution 3:

If this happens, correct the "package" name (as others have stated) then be sure to re-run "Android Lint".

The warning will stay until Lint has been run again after the correcting the error.

Solution 4:

I had the same problem: Lint wouldn't recognize an obviously correct description in AndroidManifest.xml.

I then changed the package name to one with only small alphabethical letters and dots.

The refactor scheme in Eclipse did not rename the package name automatically everywhere, so I had to fix a few situations by hand, like retyping the package name in the manifest file.

When all parts of the application at last referred to the new package name, the Lint was also at last satisfied.

So use capitals and numbers in package names only if you like trouble.

I would like to call this a bug, or at least an annoyance, in Lint, since package names should be allowed to follow Java rules.

Solution 5:

I was getting the same error message, due to a stupid error on my part. Took me a while to find it, so just in case anyone else makes the same mistake and stumbles on this thread, here's what I'd done wrong:

<?xml version="1.0" encoding="utf-8"?><manifestxmlns:android="http://schemas.android.com/apk/res/android"package="com.example.DogsDropDown"><uses-sdkandroid:minSdkVersion="7"android:targetSdkVersion="14"/><applicationandroid:icon="@drawable/icon"android:label="@string/app_name"></application><activityandroid:name="com.example.DogsDropDown.MainActivity"android:label="@string/app_name"android:launchMode="singleTop"><intent-filter><actionandroid:name="android.intent.action.MAIN"/><categoryandroid:name="android.intent.category.LAUNCHER"/></intent-filter></activity></manifest>

It's obvious once you see it - I'd placed the <activity> specification outside the <application> specification instead of inside it.

Post a Comment for "Android: Activity Not Registered In The Manifest"