简体   繁体   中英

Two cordova-plugin-device plugins

I have just added the cordova plugin com.phonegap.plugin.mobile-accessibility to my ionic project, and it had automatically installed cordova-plugin-device as it is its dependency.

This would be fine, but I already have the plugin installed (as a dependancy of another plugin) under a different name ( org.apache.cordova.device ). Has anyone got any ideas on whether I should keep both, or how I could remove one.

I think that having both of these plugins is causing the following error and stopping me from building the App.

[INFO:CONSOLE(59)] "Uncaught module cordova-plugin-device.device not found", source: file:///android_asset/www/cordova.js (59)

I have screen dumped the dependency errors I get when trying to uninstall one of the plugins.

在此处输入图片说明

Easy enough fix, I removed the android platform and then re-added it again. As it went through the install it skipped the second cordova-plugin-device plugin install so now the platform only has it once.

The App now builds and works as it should.

Answer was found here - http://forum.ionicframework.com/t/plugins-does-not-exist/2980/5

NOTE: did not need to remove and add ionic & Cordova, only the Android and iOS platforms

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM