其他分享
首页 > 其他分享> > 科尔多瓦构建返回缺少的plugin.xml

科尔多瓦构建返回缺少的plugin.xml

作者:互联网

当我构建自己的cordova项目时,我收到以下警告消息:

Missing file:
/home/vijay/workspace/Repos_temp/QuickTraq_Android/plugins/nl.x-services.plugins.toast/plugin.xml

Missing file:
/home/vijay/workspace/Repos_temp/QuickTraq_Android/plugins/cordova-plugin-device-rotation-vector/plugin.xml

当我添加插件或删除插件时也会发生这种情况.

当我添加插件或构建项目时,这只是警告,但是当我删除插件时,会出现以下错误

Error: ENOENT, no such file or directory
‘/home/vijay/workspace/Repos_temp/QuickTraq_Android/plugins/com.grumpysailor.cordova-plugin-device-rotation-vector/plugin.xml’
at Object.fs.openSync (fs.js:439:18)
at Object.fs.readFileSync (fs.js:290:15)
at Object.module.exports.parseElementtreeSync (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/util/xml-helpers.js:121:27)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/dependencies.js:56:35
at Array.forEach (native)
at Object.module.exports.package.generateDependencyInfo (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/util/dependencies.js:53:45)
at runUninstallPlatform (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/uninstall.js:218:53)
at Function.module.exports.uninstallPlatform (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/uninstall.js:81:12)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/plugin.js:205:58
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)

和我的插件删除失败..有没有办法解决这个问题?

解决方法:

plugin.xml似乎丢失了.每个添加的插件的plugin.xml的路径应为:

 <yourapp>/plugins/<some-plugin>/plugin.xml

如果在这些文件夹中找不到plugin.xml文件,则必须从其git资源中手动下载它.尝试添加设备旋转向量的xml from here,然后运行:

cordova plugin remove cordova-plugin-device-rotation-vector

如果工作正常,请对Toast plugin执行相同操作.

您可以使用以下命令找到安装的插件列表:

cordova plugin list

标签:phonegap-build,android,cordova,phonegap-plugins,cordova-plugins
来源: https://codeday.me/bug/20191010/1886610.html