3

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?

Community
  • 1
  • 1
Gianni Costanzi
  • 6,054
  • 11
  • 48
  • 74
  • Sometime lint doesn't work well. i dont know why. but i escaped out from this problem by cleaning the project. and also there is setting for android lint in window/preference(eclipse) where you can control lint to make it what to show as error or what to not. – Krishna Shrestha Jun 03 '12 at 07:01
  • RU using linux. it will work fine in Mac. – Padma Kumar Jun 03 '12 at 07:44
  • @PadmaKumar I'm running Eclipse 3.7.2 on OSX 10.7.4 – Gianni Costanzi Jun 03 '12 at 09:25
  • @chrish I tried to clean the project but it keeps saying the activity is not declared.. I know I can simply ignore it, but I wanted to understand if there is a problem in my *AndroidManifest.xml* file. – Gianni Costanzi Jun 03 '12 at 09:28
  • Hm, if you only use lowercase characters for your java package name then? Using camel-case for packages is a *bit* non-standard, but Lint shouldn't be that stupid should it? – Jens Jun 03 '12 at 10:41
  • @Jens I made a big mistake using mixed-case for package name.. My app is already on the market, I think I can not change the package to lowercase without breaking something on google play, am I right? I'll ask another question. – Gianni Costanzi Jun 03 '12 at 10:59
  • @Jens I've opened a [new question](http://stackoverflow.com/questions/10869800/erroneously-used-mixed-case-package-name-on-an-already-deployed-app-can-i-chang) to address the possible problems related to a change of the package name to use only lowercase letters. – Gianni Costanzi Jun 03 '12 at 11:12
  • @GianniCostanzi - well, there's not much you can do about it in that case - package names are case sensitive & you cannot update the package name of your application without making it "a new one". Why not just [suppress](http://tools.android.com/tips/lint/suppressing-lint-warnings) the error since Lint is obviously a bit broken on this issue? – Jens Jun 03 '12 at 11:26

1 Answers1

2

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.

Jens
  • 16,853
  • 4
  • 55
  • 52