2

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.

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.

This is the error I do get when i'm typing in: 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 Answer 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:

cordova platform rm android
cordova platform add android

After these command you can rebuild the project for Android, like so:

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.

Sign up to request clarification or add additional context in comments.

2 Comments

If you are satisfied with the answer, please click the checkmark next to the answer to accept the answer.
I worked, but i manually had to remove plugins before add platform.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.