0
votes

After Run the this command :- ionic cordova build android --aot

[12:00:25] ionic-app-script task: "build" [12:00:25] Error: The Angular AoT build failed. See the issues above Error: The Angular AoT build failed. See the issues above at C:\Users\Admin\Git\olm_android\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:237:55 at step (C:\Users\Admin\Git\olm_android\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:32:23) at Object.next (C:\Users\Admin\Git\olm_android\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:13:53) at fulfilled (C:\Users\Admin\Git\olm_android\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:4:58) [ERROR] An error occurred while running subprocess ionic-app-scripts.

Error Image

Error Comes After Build

ionic cordova build android --release --aot

Failed To build Apk and after normal run it will take time to load on mobile...taking to much time to load open an component

My dependencies

"dependencies": {
    "@angular/animations": "^5.1.1",
    "@angular/cdk": "^5.0.1",
    "@angular/common": "5.2.10",
    "@angular/compiler": "5.2.10",
    "@angular/compiler-cli": "5.2.10",
    "@angular/core": "5.2.10",
    "@angular/fire": "^5.2.1",
    "@angular/forms": "5.2.10",
    "@angular/http": "5.2.10",
    "@angular/material": "^5.0.1",
    "@angular/platform-browser": "5.2.10",
    "@angular/platform-browser-dynamic": "5.2.10",
    "@ionic-native/core": "4.7.0",
    "@ionic-native/fcm": "^4.12.2",
    "@ionic-native/file": "^4.11.0",
    "@ionic-native/file-opener": "^4.11.0",
    "@ionic-native/file-transfer": "^4.11.0",
    "@ionic-native/firebase": "^4.7.0",
    "@ionic-native/firebase-messaging": "^4.11.0",
    "@ionic-native/header-color": "^4.7.0",
    "@ionic-native/in-app-browser": "^4.11.0",
    "@ionic-native/social-sharing": "^4.20.0",
    "@ionic-native/splash-screen": "4.7.0",
    "@ionic-native/status-bar": "^4.7.0",
    "@ionic/angular": "^4.4.2",
    "@ionic/core": "^4.4.2",
    "@ionic/lab": "^1.0.13",
    "@ionic/pro": "1.0.20",
    "@ionic/storage": "2.1.3",
    "angularfire2": "^5.0.0-rc.6",
    "cordova-android": "7.1.4",
    "cordova-android-support-gradle-release": "^1.4.7",
    "cordova-browser": "^6.0.0",
    "cordova-plugin-console": "^1.1.0",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-file": "^6.0.2",
    "cordova-plugin-file-opener2": "^2.2.1",
    "cordova-plugin-file-transfer": "^1.7.1",
    "cordova-plugin-headercolor": "^1.0.0",
    "cordova-plugin-inappbrowser": "^3.1.0",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^1.2.1",
    "cordova-plugin-splashscreen": "^5.0.3",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-whitelist": "^1.3.4",
    "cordova-plugin-x-socialsharing": "^5.6.3",
    "cordova-support-android-plugin": "^1.0.1",
    "cordova-support-google-services": "^1.2.1",
    "es6-promise-plugin": "^4.2.2",
    "firebase": "^4.12.1",
    "ionic-angular": "3.9.2",
    "ionic-selectable": "^3.0.3",
    "ionicons": "3.0.0",
    "jwt-decode": "^2.2.0",
    "natives": "^1.1.6",
    "ngx-qrcode2": "0.0.9",
    "rxjs": "5.5.10",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.4",
    "@ionic/cli-plugin-cordova": "1.6.2",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-statusbar": {},
      "cordova-plugin-headercolor": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-file": {},
      "cordova-plugin-file-opener2": {
        "ANDROID_SUPPORT_V4_VERSION": "27.+"
      },
      "cordova-android-support-gradle-release": {
        "ANDROID_SUPPORT_VERSION": "27.+"
      },
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-console": {},
      "cordova-plugin-x-socialsharing": {
        "ANDROID_SUPPORT_V4_VERSION": "24.1.1+"
      }
    },
    "platforms": [
      "browser",
      "ios",
      "android"
    ]
  }
}
1

1 Answers

0
votes

AdminverifyUnverify request page is declared in module so it is throwing error. Please define a component in a single place either in app.module.ts or adminverifyUnverify.module.ts.

remove it from app.module.ts if not opening it as a modal controller.

AOT compiler means [ production build ] not allowed any duplicate component to be declared in multiple places.