我正在使用此插件检查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".
或者有人有任何其他建议吗?
答案 0 :(得分:0)
这对我有用:
找到此行<dependency id="cordova-plugin-geolocation"version="1.0.1" />
并替换为此<dependency id="cordova-plugin-geolocation"/>
现在,安装插件。该路径应与提取的文件夹相同。 cordova插件添加C:\ User \ Desktop \ cordova-plugin-fastrde-checkgps-master