简体   繁体   English

这个debug \\ AndroidManifest错误是怎么发生的?

[英]How is this debug\AndroidManifest error happen?

The screen shot 屏幕截图

The project cannot resolve symbol R so I clean the project but the warning is as the pic, how is this happen, I did not do anything to my project. 该项目无法解析符号R所以我清理项目,但警告是照片,这是怎么回事,我没有对我的项目做任何事情。

You are putting an space character (" ") in your "com.pg.MainActivity" activity name attribute. 您在“com.pg.MainActivity”活动名称属性中放置了空格字符(“”)。 Remove that space char an it should work like a charm. 删除那个空间char它应该像魅力一样工作。 Also, the aapt error is because your Manifest file cannot be parsed, so the resources indexes cannot be generated (aapt is the program that generates the resources indexes). 此外,aapt错误是因为无法解析您的Manifest文件,因此无法生成资源索引(aapt是生成资源索引的程序)。 Also, be sure to edit the manifest file of the "main\\AndroidManifest.xml" tab. 此外,请务必编辑“main \\ AndroidManifest.xml”选项卡的清单文件。

清理并重建项目。然后你不会看到那个错误

Remove the extra character at the end in "com.pg.MainActivity" . 删除“com.pg.MainActivity”末尾的额外字符。
After this also perform, Sync Project with gradle files . 在此之后还执行, 使用gradle文件同步Project
Performing a Make Project after this should resolve the issue. 在此之后执行Make项目应该可以解决问题。 Try clean and rebuild if it is required. 如果需要,请尝试清理并重建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM