在Ionic中创建生产版本Android版本时出错

时间:2019-07-13 15:07:59

标签: angular ionic-framework

IONIC 4中为android创建构建版本时遇到了问题。我正在使用的命令是

  

ionic cordova build android --prod --release

此外,我还需要优化构建,我还附加了package.json用于当前使用的软件包版本。 任何帮助表示赞赏。 预先感谢

  

错误:模块node_modules/@ionic-native/core/decorators.d.ts的元数据版本不匹配,发现版本4,预期为3

my package.jason is
"scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build --prod",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "dependencies": {
        "@angular/common": "4.1.3",
        "@angular/compiler": "4.1.3",
        "@angular/compiler-cli": "4.1.3",
        "@angular/core": "4.1.3",
        "@angular/forms": "4.1.3",
        "@angular/http": "4.1.3",
        "@angular/platform-browser": "4.1.3",
        "@angular/platform-browser-dynamic": "4.1.3",
        "@angular/platform-server": "4.4.7",
        "@ionic-native/core": "4.20.0",
        "@ionic-native/file": "3.13.1",
        "@ionic-native/network": "4.2.0",
        "@ionic-native/splash-screen": "3.10.2",
        "@ionic-native/sqlite": "4.20.0",
        "@ionic-native/status-bar": "3.10.2",
        "@ionic-native/transfer": "3.13.1",
        "@ionic/storage": "2.0.1",
        "android": "0.0.8",
        "angular2-signaturepad": "2.6.0",
        "brmasker-ionic-3": "1.6.3",
        "chart.js": "2.5.0",
        "cordova-android": "7.1.4",
        "cordova-browser": "5.0.4",
        "cordova-ios": "4.5.5",
        "cordova-plugin-compat": "1.2.0",
        "cordova-plugin-console": "1.1.0",
        "cordova-plugin-device": "1.1.7",
        "cordova-plugin-file": "5.0.0",
        "cordova-plugin-file-transfer": "1.7.1",
        "cordova-plugin-ionic-webview": "1.2.1",
        "cordova-plugin-network-information": "1.3.4",
        "cordova-plugin-splashscreen": "4.1.0",
        "cordova-plugin-statusbar": "2.4.2",
        "cordova-plugin-whitelist": "1.3.3",
        "cordova-sqlite-storage": "3.1.0",
        "imgcache.js": "1.1.1",
        "ionic-angular": "3.9.2",
        "ionic-image-loader": "3.2.1",
        "ionic-native": "2.2.11",
        "ionic-plugin-keyboard": "2.2.1",
        "ionic2-date-picker": "1.1.3",
        "ionicons": "3.0.0",
        "moment": "2.24.0",
        "moment-timezone": "0.5.13",
        "phonegap-plugin-barcodescanner": "git+https://github.com/phonegap/phonegap-plugin-barcodescanner.git",
        "raven-js": "3.15.0",
        "rxjs": "5.4.0",
        "sw-toolbox": "3.6.0",
        "underscore": "1.8.3",
        "zone.js": "0.8.12"
    },
    "devDependencies": {
        "@angular/tsc-wrapped": "4.4.6",
        "@ionic/app-scripts": "1.3.7",
        "@ionic/cli-plugin-cordova": "1.4.1",
        "@ionic/cli-plugin-ionic-angular": "1.3.2",
        "@ionic/lab": "1.0.19",
        "typescript": "2.3.3"
    },
    "cordovaPlugins": [
        "cordova-plugin-console",
        "cordova-plugin-whitelist",
        "cordova-plugin-splashscreen",
        "cordova-plugin-statusbar",
        "ionic-plugin-keyboard",
        "cordova-plugin-device"
    ],
    "cordovaPlatforms": [],
    "description": "newapp: jazzba project",
    "cordova": {
        "plugins": {
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {},
            "cordova-plugin-file": {},
            "cordova-plugin-file-transfer": {},
            "phonegap-plugin-barcodescanner": {},
            "cordova-sqlite-storage": {},
            "cordova-plugin-network-information": {},
            "cordova-plugin-ionic-webview": {}
        },
        "platforms": [
            "android",
            "browser",
            "ios"
        ]
    }
}


Error: Metadata version mismatch for module node_modules/@ionic-native/core/decorators.d.ts, found version 4, expected 3

0 个答案:

没有答案