我对Cordova插件感到恶梦。
无法安装“ cordova-plugin-file-transfer”:Cordova错误: 安装的插件版本:“ cordova-plugin-file@4.3.3”没有 满足依赖插件要求“ cordova-plugin-file @> = 5.0.0”。 尝试--force将安装的插件用作依赖项。
依赖项
"dependencies": {
"android": "0.0.8",
"com.rjfun.cordova.httpd": "https://github.com/floatinghotpot/cordova-httpd.git",
"cordova-android": "^6.3.0",
"cordova-browser": "^5.0.4",
"cordova-media-with-compression": "~2.1.1",
"cordova-plugin-android-permissions": "~1.0.0",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-file": "~5.0.0",
"cordova-plugin-file-downloader": "^0.3.2",
"cordova-plugin-file-md5": "^0.3.3",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-fullscreen": "~1.1.0",
"cordova-plugin-insomnia": "git+https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git",
"cordova-plugin-network-information": "^2.0.1",
"cordova-plugin-speechrecognition": "~1.1.2",
"cordova-plugin-webserver": "git+https://github.com/bykof/cordova-plugin-webserver.git",
"cordova-plugin-whitelist": "~1.3.3",
"cordova-plugin-zip": "^3.1.0",
"cordova-sqlite-storage": "~2.3.3"
}
Config.xml
<plugin name="cordova-plugin-fullscreen" spec="~1.1.0" />
<plugin name="com.rjfun.cordova.httpd" spec="https://github.com/floatinghotpot/cordova-httpd.git" />
<plugin name="cordova-plugin-android-permissions" spec="~1.0.0" />
<plugin name="cordova-media-with-compression" spec="~2.1.1" />
<plugin name="cordova-plugin-file-downloader" spec="^0.3.2" />
<plugin name="cordova-plugin-file" spec="~5.0.0" />
<plugin name="cordova-plugin-file-transfer" spec="^1.7.1" />
<plugin name="cordova-plugin-insomnia" spec="https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git" />
<plugin name="cordova-sqlite-storage" spec="~2.3.3" />
<plugin name="cordova-plugin-speechrecognition" spec="~1.1.2" />
<plugin name="cordova-plugin-webserver" spec="https://github.com/bykof/cordova-plugin-webserver.git" />
<plugin name="cordova-plugin-whitelist" spec="~1.3.3" />
我已经尽力升级插件,删除插件,添加插件-清除所有插件等。
没有什么可以解决的。
我该如何克服?
答案 0 :(得分:4)
看来您的plugin-flie版本比文件传输先进行尝试
ionic cordova plugin add cordova-plugin-file
npm install --save @ionic-native/file@4.3.3
ionic cordova plugin add cordova-plugin-file-transfer --force
ionic cordova plugin add cordova-plugin-file-transfer@4.3.3