如何使用不再支持的PhoneGap插件?

时间:2017-08-30 15:26:42

标签: cordova cordova-plugins phonegap

我正在使用此插件检查GPS是enabled还是disabled

https://github.com/fastrde/cordova-plugin-fastrde-checkgps

但是在编译应用程序时,它表示不再支持该插件。我怎样才能在应用程序中使用此代码/插件?我迷路了:(

这是错误:

Error - Plugin error (you probably need to remove plugin files from your app): Fetching plugin "cordova-plugin-fastrde-checkgps@1.0.0" via npm Installing "cordova-plugin-fastrde-checkgps" at "1.0.0" for android Failed to install 'cordova-plugin-fastrde-checkgps': CordovaError: Version of installed plugin: "cordova-plugin-geolocation@2.4.3" does not satisfy dependency plugin requirement "cordova-plugin-geolocation@^1.0.1".

或者有人有任何其他建议吗?

1 个答案:

答案 0 :(得分:0)

这对我有用:

  1. 以zip格式从存储库下载插件。
  2. 解压缩拉链。
  3. 打开位于您喜欢的文本编辑器或IDE
  4. 中文件夹内的plugin.xml文件
  5. 找到此行<dependency id="cordova-plugin-geolocation"version="1.0.1" />并替换为此<dependency id="cordova-plugin-geolocation"/>

  6. 现在,安装插件。该路径应与提取的文件夹相同。 cordova插件添加C:\ User \ Desktop \ cordova-plugin-fastrde-checkgps-master

相关问题