I installed the plugin com.rjfun.cordova.plugin.admob
a while ago, but I removed the plugin last month. I just deleted the plugin folder to delete the plugin. When I try to build the project I do get an error.
我刚刚安装了插件com.rjfun.cordova.plugin.admob,但我上个月删除了插件。我刚刚删除了插件文件夹来删除插件。当我尝试构建项目时,我确实收到了错误。
These are the things I have tried:
这些是我尝试过的东西:
Remove the plugin on this way: cordova plugin rm com.rjfun.cordova.plugin.admob
. Delete the com.rjfun.cordova.plugin.admob
plugin in the fetch.xml
and the android.xml
files in the plugins folder.
以这种方式删除插件:cordova插件rm com.rjfun.cordova.plugin.admob。删除fetch.xml中的com.rjfun.cordova.plugin.admob插件和plugins文件夹中的android.xml文件。
This is the error I do get when i'm typing in: cordova build android
:
这是我在输入时遇到的错误:cordova build android:
Error: ENOENT, no such file or directory 'C:\Users\Dirk\Hollan d App 2015\Ionic\Holland\plugins\com.rjfun.cordova.plugin.admob\plugin.xml' at Object.fs.openSync (fs.js:432:18) at Object.fs.readFileSync (fs.js:289:15) at Object.module.exports.parseElementtreeSync (C:\Users\Dirk\AppData\Roam ing\npm\node_modules\cordova\node_modules\cordova-lib\src\util\xml-helpers.js:11 8:27) at new PluginInfo (C:\Users\Dirk\AppData\Roaming\npm\node_modules\cordova \node_modules\cordova-lib\src\PluginInfo.js:298:37) at PluginInfoProvider.get (C:\Users\Dirk\AppData\Roaming\npm\node_modules \cordova\node_modules\cordova-lib\src\PluginInfoProvider.js:35:32) at C:\Users\Dirk\AppData\Roaming\npm\node_modules\cordova\node_modules\co rdova-lib\src\plugman\prepare.js:79:45 at Array.forEach (native) at Object.handlePrepare (C:\Users\Dirk\AppData\Roaming\npm\node_modules\c ordova\node_modules\cordova-lib\src\plugman\prepare.js:77:24) at C:\Users\Dirk\AppData\Roaming\npm\node_modules\cordova\node_modules\co rdova-lib\src\cordova\prepare.js:108:21 at Array.map (native)
I hope that anyone have had the same problem or know a way to resolve this problem.
我希望任何人都有同样的问题或知道解决这个问题的方法。
Thank you!
谢谢!
1 个解决方案
#1
5
The correct way to remove a plugin would be:
删除插件的正确方法是:
cordova plugin rm com.rjfun.cordova.plugin.admob
You should not have to delete anything manually. Maybe you can correct all XML files now by deleting the platform and add it again, like so:
您不必手动删除任何内容。也许您现在可以通过删除平台并再次添加来更正所有XML文件,如下所示:
cordova platform rm android
cordova platform add android
After these command you can rebuild the project for Android, like so:
在这些命令之后,您可以重建Android项目,如下所示:
cordova build android
Also note if you are using Ionic as the tag to the questions suggest, you can replace cordova
with ionic
in all commands.
另请注意,如果您使用Ionic作为问题建议的标签,您可以在所有命令中用ionic替换cordova。
#1
5
The correct way to remove a plugin would be:
删除插件的正确方法是:
cordova plugin rm com.rjfun.cordova.plugin.admob
You should not have to delete anything manually. Maybe you can correct all XML files now by deleting the platform and add it again, like so:
您不必手动删除任何内容。也许您现在可以通过删除平台并再次添加来更正所有XML文件,如下所示:
cordova platform rm android
cordova platform add android
After these command you can rebuild the project for Android, like so:
在这些命令之后,您可以重建Android项目,如下所示:
cordova build android
Also note if you are using Ionic as the tag to the questions suggest, you can replace cordova
with ionic
in all commands.
另请注意,如果您使用Ionic作为问题建议的标签,您可以在所有命令中用ionic替换cordova。