Android的皮棉抱怨在AndroidManifest没有登记活动,但它是 [英] Android Lint complaining about activity not registered in AndroidManifest, but it is
问题描述
当我在我的项目运行Android林特我得到以下警告:
When I run Android Lint on my project I get the following warning:
的org.slaytanic.SIMLockedRingNotifier.SIMLockedRingNotifierActivity未在清单中注册
The org.slaytanic.SIMLockedRingNotifier.SIMLockedRingNotifierActivity is not registered in the manifest
问题:确保活动,服务和内容提供商都登记在清单
Issue: Ensures that Activities, Services and Content Providers are registered in the manifest
编号:注册
活动,服务和内容提供商应该使用注册在AndroidManifext.xml文件,和标签。
Activities, services and content providers should be registered in the AndroidManifext.xml file using , and tags.
如果你的活动仅仅是一个父类拟由其他真正的活动子类化,使其成为一个抽象类。 http://developer.android.com/guide/topics/manifest/manifest -intro.html
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>
[...]
我也试着更换活动的的安卓名称的属性的完整路径安卓名=org.slaytanic.SIMLockedRingNotifier.SIMLockedRingNotifierActivity
,但我得到了同样的警告。该应用程序完美的作品和活动是正确添加到启动程序。我怎样才能摆脱它?我失去了一些东西?
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?
推荐答案
我测试了在Eclipse中两个快速的应用程序,它似乎是Lint是无法确定是否活动
使用带有大写字符的非标准包名正确添加到的AndroidManifest.xml
。
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
.
被记录在他们的<一个问题href="http://$c$c.google.com/p/android/issues/detail?id=27529&can=1&q=Lint&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars"相对=nofollow> bug跟踪系统了。
这篇关于Android的皮棉抱怨在AndroidManifest没有登记活动,但它是的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!