两个 cordova-plugin-device 插件

Two cordova-plugin-device plugins

我刚刚将 cordova 插件 com.phonegap.plugin.mobile-accessibility 添加到我的 ionic 项目中,它已自动安装 cordova-plugin-device 因为它是它的依赖项。

这很好,但我已经以不同的名称 (org.apache.cordova.device) 安装了插件(作为另一个插件的依赖项)。有没有人知道我是否应该保留两者,或者如何删除一个。

我认为同时拥有这两个插件会导致以下错误并阻止我构建应用程序。

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

我已经在屏幕上转储了我在尝试卸载其中一个插件时遇到的依赖性错误。

修复很简单,我删除了 android 平台,然后重新添加了它。在安装过程中,它跳过了第二个 cordova-plugin-device 插件安装,所以现在平台只有一次。

应用程序现在可以正常构建和运行。

答案已在此处找到 - http://forum.ionicframework.com/t/plugins-does-not-exist/2980/5

注意: 不需要删除和添加 ionic & Cordova,只需要 Android 和 iOS 平台