Reputation: 3573
I am using Cordova to build a mobile app. I was trying to find some gesture detection plugins to add some swiping features to the app. I installed a plugin "com.rossgerbasi.cordova.plugins.glass.Glass" but no longer need it. I had issues trying to uninstall it. I have ran cordova remove plugin com.rossgerbasi.cordova.plugins.glass.Glass with some errors. I was able to successfully remove it after some googling and when I run cordova plugin list it is no longer there.
So I removed and readded the ios and android platforms. However now when I run cordova run android the app builds and is installed on my device but immediately crashes with a ClassNotFoundException: com.rossgerbasi.cordova.plugins.glass.Glass.
I did a search in the C drive for rossgerbasi and it found a few results including references to it in platform\android. I deleted them all and deleted the entry for it in the android config.xml but that file is automagically generated so after I run the app that entry returns. There is still something somewhere still holding onto this plugin and adding it to my app. What do I need to do to remove this plugin from my app?
Upvotes: 0
Views: 504
Reputation: 11935
If you remove plugin from plugin folder manually (which is generally not advisable), to remove the plugin dependency do the following:
fetch.json
file available under plugins
folderUpvotes: 1
Reputation: 2533
If running cordova plugin rm <plugin_id>
doesn't do the trick, then what I've done in the past is just remove the plugin manually. I remove the plugin folder under <cordova_project>/plugins/<plugin>
. I also remove the plugin entry in <cordova_project>/plugins/<platform.json>
& <cordova_project>/plugins/fetch.json
Upvotes: 1
Reputation: 3573
Well I ended up fixing the problem. I did another search inside files for the text rossgerbasi inside my project directory. I found a reference to it inside a handful of files. I deleted the references to this plugin in those files and now the app runs again. There was a reference to it still in cordova_plugins.js and I am guessing that is the one causing the issues. My guess is it tells Cordova which plugins to use. For some reason after I ran cordova remove to remove that plugin it was not removed from this file like it should have been. If someone can tell me if I am correct that would be great.
Upvotes: 0