Cordova构建返回缺少plugin.xml [英] Cordova build returns missing plugin.xml
问题描述
当我构建我的cordova项目时,我收到一个警告消息
缺少文件:/ home / vijay / workspace / Repos_temp /QuickTraq_Android/plugins/nl.x-services.plugins.toast/plugin.xml
缺少文件:/ home / vijay / workspace / Repos_temp / QuickTraq_Android / plugins / cordova-plugin-device-rotation-vector / plugin。 xml
当我添加插件或删除插件时,会发生这种情况。
当我添加一个插件或构建项目,但是当我删除插件错误发生作为
错误:ENOENT,没有此类文件或目录'/home/vijay/workspace/Repos_temp/QuickTraq_Android/plugins/com.grumpysailor.cordova-plugin-device-rotation-vector/plugin.xml'
在Object.fs.openSync(fs.js:439:18)
在Object.fs.readFileSync(fs.js:290:15)
在Object.module.exports.parseElementtreeSync(/ usr /local/lib/node_modules/cordova/node_modules/cordova-lib/src/util/xml-helpers.js:121:27)
在/ usr / local / lib / node_modules / cordova / node_modules / cordova-lib /src/plugman/util/dependencies.js:56:35
在Array.forEach(native)
在Object.module.exports.package.generateDependencyInfo(/ usr / local / lib / node_modules / cordova /node_modules/cordova-lib/src/plugman/util/dependencies.js:53:45)
在runUninstallPlatform(/ usr / local / lib / node_modules / cordova / node_modules / cordova-lib / src / plugman / uninstall .js:218:53)
在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资源下载它。尝试添加 device-rotation-vector
的xml从这里,然后运行:
cordova插件remove cordova-plugin- rotation-vector
如果正确工作,请对 Toast插件。
您可以找到插件列表安装使用:
cordova插件列表
When i build my cordova project i get an warning message as
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
This happens when i add an plugin or remove an plugin also .
This happens just as a warning when i add a plugin or build the project but when i remove the plugin error occurs as
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)
and my plugin remove failed .. Is there an way to resolve this ??
The plugin.xml looks to be missing. The path to each added plugin's plugin.xml should be:
<yourapp>/plugins/<some-plugin>/plugin.xml
If you cannot find the plugin.xml files in those folders, you will have to manually download it from its git resource. Try adding device-rotation-vector
's xml from here and then run:
cordova plugin remove cordova-plugin-device-rotation-vector
If it works correctly, do the same for Toast plugin.
You can find the list of plugins installed using:
cordova plugin list
这篇关于Cordova构建返回缺少plugin.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!