Search code examples
androidandroid-manifestandroid-activityandroid-lint

Android Lint complaining about activity not registered in AndroidManifest, but it is


When I run Android Lint on my project I get the following warning:

The org.slaytanic.SIMLockedRingNotifier.SIMLockedRingNotifierActivity is not registered in the manifest

Issue: Ensures that Activities, Services and Content Providers are registered in the manifest

Id: Registered

Activities, services and content providers should be registered in the AndroidManifext.xml file using , and tags.

If your activity is simply a parent class intended to be subclassed by other "real" activities, make it an abstract class. http://developer.android.com/guide/topics/manifest/manifest-intro.html

SIMLockedRingNotifierActivity.java

package org.slaytanic.SIMLockedRingNotifier;

public class SIMLockedRingNotifierActivity extends Activity {
    [...]

AndroidManifest.xml

<application
    android:icon="@drawable/application_icon"
    android:label="@string/app_name" >
    <activity
        android:name=".SIMLockedRingNotifierActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
[...]

I've also tried to replace the activity's android:name attribute with the full pathandroid:name="org.slaytanic.SIMLockedRingNotifier.SIMLockedRingNotifierActivity" but I get the same warning. The app works perfectly and that activity is correctly added to the launcher. How can I get rid of it? Am I missing something?


Solution

  • I tested with two quick apps in Eclipse and it does appear that Lint is unable to determine if an Activity that uses a "non-standard" package name with upper-case characters is correctly added to the AndroidManifest.xml.

    The issue is logged in their bug tracker already.