生成APK时出错
*
为Android安装“ cordova-plugin-file-transfer”
使用该版本的插件依赖性“ cordova-plugin-file@4.3.3”已被获取。
相关插件“ cordova-plugin-file”已安装在android上。
为Android安装“ cordova-plugin-filepath”
为Android安装“ cordova-plugin-geolocation”
使用该版本的插件依赖项“ cordova-plugin-compat@1.2.0”已被获取。
为Android安装“ cordova-plugin-compat”
插件不支持该项目的cordova-android版本。 cordova-android:6.4.0,失败的版本要求:
<6.3.0
跳过“ cordova-plugin-compat”为Android
为Android安装“ cordova-plugin-ionic-webview”
为Android安装“ cordova-plugin-media”
无法安装“ cordova-plugin-media”:CordovaError:已安装插件的版本:“ cordova-plugin-file@4.3.3”不满足依赖项插件要求“ cordova-plugin-file@^6.0.0”。尝试--force将安装的插件用作依赖项。
在/home/ritzylab/a/munshiji247-ionic/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:557:37
在_fulfilled(/home/ritzylab/a/munshiji247-ionic/node_modules/cordova/node_modules/q/q.js:854:54)
在self.promiseDispatch.done(/home/ritzylab/a/munshiji247-ionic/node_modules/cordova/node_modules/q/q.js:883:30)
在Promise.promise.promiseDispatch(/home/ritzylab/a/munshiji247-ionic/node_modules/cordova/node_modules/q/q.js:816:13)
在/home/ritzylab/a/munshiji247-ionic/node_modules/cordova/node_modules/q/q.js:570:49
在runSingle(/home/ritzylab/a/munshiji247-ionic/node_modules/cordova/node_modules/q/q.js:137:13)
在刷新时(/home/ritzylab/a/munshiji247-ionic/node_modules/cordova/node_modules/q/q.js:125:13)
在_combinedTickCallback(内部/进程/next_tick.js:132:7)
在process._tickCallback(内部/进程/next_tick.js:181:9)
已安装插件的版本:“ cordova-plugin-file@4.3.3”不满足依赖项插件要求“ cordova-plugin-file@^6.0.0”。尝试--force将安装的插件用作依赖项。
[错误]运行子进程cordova时发生错误。
*
Cordova插件列表
Package.json
"dependencies": {
"@agm/core": "^1.0.0-beta.3",
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/compiler-cli": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@ionic-native/barcode-scanner": "^4.4.2",
"@ionic-native/battery-status": "^4.15.0",
"@ionic-native/camera": "^4.13.0",
"@ionic-native/core": "^4.1.0",
"@ionic-native/file": "^4.14.0",
"@ionic-native/file-path": "^4.1.0",
"@ionic-native/file-transfer": "^4.13.0",
"@ionic-native/geolocation": "^4.4.2",
"@ionic-native/keyboard": "3.4.4",
"@ionic-native/media": "^4.14.0",
"@ionic-native/media-capture": "^4.14.0",
"@ionic-native/network": "^4.3.2",
"@ionic-native/splash-screen": "^3.4.4",
"@ionic-native/status-bar": "3.4.4",
"@ionic-native/transfer": "^3.14.0",
"@ionic-native/video-capture-plus": "^4.13.0",
"@ionic-native/video-player": "^4.14.0",
"@ionic/cloud-angular": "^0.12.0",
"@ionic/storage": "^2.0.1",
"@types/cordova-plugin-battery-status": "^1.2.3",
"@types/cordova-plugin-media": "^3.0.0",
"@types/ionic": "^3.19.0",
"@types/underscore": "^1.8.9",
"angular2-signaturepad": "^2.6.1",
"babel-runtime": "^6.26.0",
"backo2": "^1.0.2",
"component-bind": "^1.0.0",
"cordova": "^8.1.2",
"cordova-android": "6.4.0",
"cordova-ios": "~4.3.1",
"cordova-plugin-battery-status": "^2.0.2",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-console": "~1.0.6",
"cordova-plugin-device": "~1.1.5",
"cordova-plugin-file-transfer": "~1.6.3",
"cordova-plugin-geolocation": "~2.4.3",
"cordova-plugin-media": "^5.0.2",
"cordova-plugin-media-capture": "^1.4.3",
"cordova-plugin-splashscreen": "~4.0.2",
"cordova-plugin-statusbar": "~2.2.2",
"cordova-plugin-video-capture-plus": "^1.0.0",
"cordova-plugin-video-player": "git+https://github.com/moust/cordova-plugin-videoplayer.git",
"cordova-plugin-whitelist": "~1.3.2",
"cordova-plugin-wkwebview-engine": "https://github.com/driftyco/cordova-plugin-wkwebview-engine.git",
"cordova-sqlite-storage": "~2.0.3",
"engine.io-client": "^3.1.4",
"font-awesome": "^4.7.0",
"has-binary": "^0.1.7",
"ionic": "^4.1.2",
"ionic-angular": "3.0.1",
"ionic-image-loader": "^4.1.1",
"ionic-img-viewer": "^1.3.4",
"ionic-plugin-keyboard": "~2.2.1",
"ionicons": "3.0.0",
"isobject": "^3.0.1",
"jquery": "^3.2.1",
"lodash": "^4.17.4",
"moment": "^2.22.2",
"moment-timezone": "^0.5.13",
"parseuri": "0.0.5",
"phonegap-plugin-barcodescanner": "^7.0.0",
"phonegap-plugin-push": "~1.10.5",
"reflect-metadata": "^0.1.10",
"rxjs": "5.1.1",
"setimmediate": "^1.0.5",
"signature_pad": "^2.3.2",
"socket.io-client": "^1.7.3",
"socket.io-parser": "^3.1.2",
"sw-toolbox": "3.4.0",
"to-array": "^0.1.4",
"underscore": "^1.9.1",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/tsc-wrapped": "^4.4.6",
"@ionic/app-scripts": "1.3.0",
"@ionic/cli-plugin-cordova": "1.6.2",
"@ionic/cli-plugin-ionic-angular": "1.4.1",
"@types/lodash": "^4.14.62",
"@types/moment-timezone": "^0.2.34",
"@types/socket.io-client": "^1.4.29",
"typescript": "~2.2.1"
},
"cordova": {
"platforms": [
"android",
"ios"
],
"plugins": {
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-wkwebview-engine": {},
"cordova-sqlite-storage": {},
"ionic-plugin-keyboard": {},
"phonegap-plugin-push": {
"SENDER_ID": "694054568313"
},
"cordova-plugin-media-capture": {},
"phonegap-plugin-barcodescanner": {
"CAMERA_USAGE_DESCRIPTION": " "
},
"cordova-plugin-file-transfer": {},
"cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
},
"com.moust.cordova.videoplayer": {},
"cordova-plugin-camera": {},
"cordova-plugin-media": {},
"cordova-plugin-file": {},
"cordova-plugin-battery-status": {}
}
}
答案 0 :(得分:1)
似乎您已安装了多个版本的插件-4.3.3&6.0.0
ionic cordova plugin rm cordova-plugin-file
ionic cordova platform rm android
ionic cordova plugin add cordova-plugin-file
ionic cordova platform add android
如果您需要特定版本的插件,则可以在添加命令末尾以
ionic cordova plugin add cordova-plugin-file@6.0.0