在离子android部署构建过程中,诊断和应用程序最小化功能出错

时间:2019-03-28 20:25:04

标签: angular ionic3

使用Ionic 3-Angular 4创建应用程序,并且遇到以下错误,我在运行部署版本时无法克服此错误。 关于如何解决这些问题的想法?

ionic cordova运行android --prod

  

[00:32:46] ionic-app-scripts 3.1.11 [00:32:46]构建产品开始   ... [00:32:47]清洁开始... [00:32:47]清洁在37毫秒内完成   [00:32:47]复制开始... [00:32:47]深层链接开始...   [00:32:47]深度链接在456毫秒内完成[00:32:47] ngc已启动...   [00:32:53] ionic-app-script任务:“生成” [00:32:53]错误:元数据   模块版本不匹配   C:/fee/feature/node_modules/@ionic-native/diagnostic/index.d.ts,               找到版本4,预期为3错误:模块的元数据版本不匹配   C:/fee/feature/node_modules/@ionic-native/diagnostic/index.d.ts,找到   版本4,预期3       在StaticSymbolResolver.getModuleMetadata(C:\ fee \ feature \ node_modules @ angular \ compiler \ bundles \ compiler.umd.js:24474:34)       在StaticSymbolResolver._createSymbolsOf(C:\ fee \ feature \ node_modules @ angular \ compiler \ bundles \ compiler.umd.js:24260:46)       在StaticSymbolResolver.getSymbolsOf(C:\ fee \ feature \ node_modules @ angular \ compiler \ bundles \ compiler.umd.js:24241:14)       在C:\ fee \ feature \ node_modules @ angular \ compiler \ bundles \ compiler.umd.js:23023:30       在Array.forEach()       在extractProgramSymbols(C:\ fee \ feature \ node_modules @ angular \ compiler \ bundles \ compiler.umd.js:23022:79)       在AotCompiler.compileAll(C:\ fee \ feature \ node_modules @ angular \ compiler \ bundles \ compiler.umd.js:22720:47)       在CodeGenerator.codegen(C:\ fee \ feature \ node_modules @ angular \ compiler-cli \ src \ codegen.js:30:14)       在Function.NgTools_InternalApi_NG_2.codeGen(C:\ fee \ feature \ node_modules @ angular \ compiler-cli \ src \ ngtools_api.js:61:30)       在C:\ fee \ feature \ node_modules @ ionic \ app-scripts \ dist \ aot \ aot-compiler.js:182:73   [ERROR]运行子流程ionic-app-scripts时发生错误。

     

下面是package.json的快照

     

“依赖项”:{       “ @ 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-b​​rowser”:“ 4.1.3”,       “ @ angular / platform-b​​rowser-dynamic”:“ 4.1.3”,       “ @ ionic-native / base64-to-gallery”:“ 4.3.3”,       “ @ ionic-native / camera”:“ 4.3.3”,       “ @ ionic-native / core”:“ 4.3.3”,       “ @ ionic-native / diagnostic”:“ ^ 4.20.0”,       “ @ ionic-native / local-notifications”:“ 4.3.3”,       “ @ ionic-native / onesignal”:“ ^ 4.3.3”,       “ @ ionic-native / pin-dialog”:“ 4.3.3”,       “ @ ionic-native / splash-screen”:“ 4.3.3”,       “ @ ionic-native / status-bar”:“ 4.3.3”,       “ @ ionic-native / youtube-video-player”:“ 4.3.3”,       “ @ ionic / storage”:“ 2.0.1”,       “ @ types / moment-timezone”:“ ^ 0.5.12”,       “ angular2-uuid”:“ ^ 1.1.1”,       “ cordova-android”:“ 7.0.0”,       “ cordova-base64-to-gallery”:“ ^ 4.1.2”,       “ cordova-browser”:“ ^ 5.0.4”,       “ cordova-ios”:“ ^ 4.5.0”,       “ cordova-plugin-app-event”:“ ^ 1.2.1”,       “ cordova-plugin-camera”:“ ^ 2.4.1”,       “ cordova-plugin-compat”:“ ^ 1.2.0”,       “ cordova-plugin-device”:“ ^ 1.1.7”,       “ cordova-plugin-pin-dialog”:“ ^ 0.1.3”,       “ cordova-plugin-splashscreen”:“ ^ 4.1.0”,       “ cordova-plugin-statusbar”:“ ^ 2.4.2”,       “ cordova-plugin-whitelist”:“ ^ 1.3.3”,       “ cordova-plugin-youtube-video-player”:“ ^ 1.0.6”,       “ cordova.plugins.diagnostic”:“ 4.0.12”,       “ de.appplant.cordova.plugin.local-notification”:“ ^ 0.8.5”,       “ intl”:“ ^ 1.2.5”,       “离子角”:“ 3.4.0”,       “ ionic-audio”:“ ^ 3.2.0”,       “ ionic-plugin-keyboard”:“ ^ 2.2.1”,       “ ionic2-auto-complete”:“ ^ 1.5.3-beta”,       “ ionic2-calendar”:“ ^ 0.3.11”,       “ ionicons”:“ 3.0.0”,       “ moment”:“ ^ 2.24.0”,       “ moment-timezone”:“ ^ 0.5.23”,       “ onesignal-cordova-plugin”:“ 2.4.5”,       “ rxjs”:“ 5.4.0”,       “ sw-toolbox”:“ 3.6.0”,       “ zone.js”:“ 0.8.12”},“ devDependencies”:{       “ @ ionic / app-scripts”:“ ^ 3.1.11”,       “ @ ionic / cli-plugin-cordova”:“ 1.4.0”,       “ @ ionic / cli-plugin-ionic-angular”:“ 1.3.1”,       “ typescript”:“ ^ 2.7.2”},“ description”:“ An Ionic project”,“ cordova”:{       “插件”:{         “ cordova-plugin-camera”:{},         “ cordova-plugin-device”:{},         “ cordova-plugin-splashscreen”:{},         “ cordova-plugin-statusbar”:{},         “ cordova-plugin-whitelist”:{},         “ ionic-plugin-keyboard”:{},         “ onesignal-cordova-plugin”:{},         “ cordova.plugins.diagnostic”:{           “ ANDROID_SUPPORT_VERSION”:“ 28. +”}},

0 个答案:

没有答案