EES*_*EES 19 java eclipse android
我是Android开发的新手.在我将我的eclipse和Android SDK更新到最新版本后,我收到了一个警告:
Use '$' instead of '.' for inner classes (or use only lowercase letters in package names) AndroidManifest.xml
Run Code Online (Sandbox Code Playgroud)
我在这个链接上找到了一些信息.
"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.)"
Run Code Online (Sandbox Code Playgroud)
我相信我在子包名中使用了大写字符com.abc.app.Promotion
.
问题是:在manifest.xml中摆脱此警告的最佳方法是什么?它仍然可以构建和运行,但我发现它很烦人.
我尝试使用重构来重命名包并修改了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?
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助!
编辑:原始manifest.xml
<activity android:name=".Promotion.Promotion" ></activity>
Run Code Online (Sandbox Code Playgroud)
更新了manifest.xml
<activity android:name="promotion.Promotion" ></activity>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7627 次 |
最近记录: |