生成应用程序时出错 - “格式错误的评论”
Posted
技术标签:
【中文标题】生成应用程序时出错 - “格式错误的评论”【英文标题】:Error generating app - "Malformed Comment" 【发布时间】:2021-10-07 22:44:05 【问题描述】:使用我开发的插件生成安卓应用时,出现以下错误:
No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "https://github.com/ruption-lda/ruption-ar-cordova-plugin.git"
fetch: Installing https://github.com/ruption-lda/ruption-ar-cordova-plugin.git to /var/lib/builder/builds/0ef2e8ae-548b-48aa-ab11-225c2030063f/source
Running command: npm install https://github.com/ruption-lda/ruption-ar-cordova-plugin.git --save-exact
Command finished with error code 0: npm install,https://github.com/ruption-lda/ruption-ar-cordova-plugin.git,--save-exact
Error: Malformed comment
Line: 96
Column: 13
Char:
at error (/usr/lib/node_modules/cordova/node_modules/sax/lib/sax.js:666:10)
at strictFail (/usr/lib/node_modules/cordova/node_modules/sax/lib/sax.js:692:7)
at SAXParser.write (/usr/lib/node_modules/cordova/node_modules/sax/lib/sax.js:1195:13)
at XMLParser.feed (/usr/lib/node_modules/cordova/node_modules/elementtree/lib/parsers/sax.js:48:15)
at ElementTree.parse (/usr/lib/node_modules/cordova/node_modules/elementtree/lib/elementtree.js:271:10)
at Object.parse (/usr/lib/node_modules/cordova/node_modules/elementtree/lib/elementtree.js:584:8)
at parseElementtreeSync (/usr/lib/node_modules/cordova/node_modules/cordova-common/src/util/xml-helpers.js:127:19)
at new PluginInfo (/usr/lib/node_modules/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfo.js:40:20)
at PluginInfoProvider.get (/usr/lib/node_modules/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js:35:36)
at /usr/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:144:51
有谁知道错误来自哪里?我检查了每个文件中是否有未注释的行,但没有。
【问题讨论】:
【参考方案1】:您在 plugin.xml 的另一个评论部分中的第 97 行有一个“开始评论”,其中显示 WikititudePlugin Source:
<!-- ios --> <!--
<platform name="ios">
<!-- WikitudePlugin Source --
将来,您可以针对您的 plugin.xml 运行任何 xml 验证器,它会告诉您(就像您的错误报告中的 sax.js 一样,它只差一行)。
【讨论】:
非常感谢!这解决了它!你是一个活着的传奇!以上是关于生成应用程序时出错 - “格式错误的评论”的主要内容,如果未能解决你的问题,请参考以下文章
在 .NET CORE 3.1 应用程序中访问使用脚手架生成的视图时出错
Firebase AppCheck iOS 在生成 appcheck 令牌错误代码 0 时出错