我是
Android开发的新手.当我将eclipse和Android SDK更新到最新版本后,我发现了一个警告:
Use '$' instead of '.' for inner classes (or use only lowercase letters in package names) AndroidManifest.xml
"When you reference an inner class in a manifest file,you must use '$' instead of '.' " + "as the separator character,e.g. Outer$Inner instead of Outer.Inner.\n" + "\n" + "(If you get this warning for a class which is not actually an inner class,it's " + "because you are using uppercase characters in your package name,which is not " + "conventional.)"
我相信我使用像com.abc.app.Promotion这样的子包名称中的大写字符.
问题是:在manifest.xml中摆脱这个警告的最好办法是什么?它仍然可以建立和运行,但我觉得这么烦人.
我尝试使用refactor来重命名包,并修改了manifest.xml android:name =“com.abc.app.promotion.Promotion”,但是得到了这个错误:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.abc.app/com.abc.app.TabView}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.abc.app/com.abc.app.promotion.Promotion}; have you declared this activity in your AndroidManifest.xml?
感谢您的帮助!
编辑:
原始manifest.xml
<activity android:name=".Promotion.Promotion" ></activity>
更新了manifest.xml
<activity android:name="promotion.Promotion" ></activity>
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。