解决AndroidManifest.xml里注释有中文 或 “-->”前没有空格时 出错的bug #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
本commit解决的问题描述:(本人已十分确定自己的AndroidManifest.xml是UTF-8 并且gradle设置了options.encoding = "UTF-8")
1、 此时 会报错org.xml.sax.SAXParseException: The string "--" is not permitted within comments. 解决方法也可以
2、注释中有中文时,copy 到的AndroidManifest.xml里面中文会变成乱码,gradle构建就会出错: error: Error parsing XML: not well-formed (invalid token)。
我的解决方法很简单,就是把临时的AndroidManifest.xml中的注释用正则删掉即可。亲测可行,望作者采纳,谢谢。