Ionic应用程序在Android设备/模拟器上启动时崩溃

时间:2018-10-15 19:54:07

标签: android ionic-framework mobile crash

我已经多次构建Ionic应用程序而没有任何问题,上周末,我在CSS中更改了一行,然后重新构建了该应用程序,然后它崩溃了,我删除了在CSS中添加的行并重新构建,仍然相同问题。

这是我的ionic info输出

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.9.1
ionic (Ionic CLI) : 3.9.1

global packages:

    Cordova CLI : 8.1.2 (cordova-lib@8.1.1)

local packages:

    @ionic/app-scripts : 3.2.0
    Cordova Platforms  : android 7.1.1 ios 4.5.5
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.2
    Node       : v8.10.0
    npm        : 6.1.0
    OS         : macOS High Sierra
    Xcode      : Xcode 9.2 Build version 9C40b

还有我的package.json文件:

{
  "name": "{app name here}",
  "version": "0.0.1",
  "description": "An Ionic project",
  "license": "Apache-2.0",
  "repository": {
    "type": "git",
    "url": "https://github.com/ionic-team/ionic-conference-app.git"
  },
  "scripts": {
    "build": "ionic build",
    "serve": "ionic build",
    "start": "npm run serve"
  },
  "dependencies": {
    "@angular/common": "5.0.0",
    "@angular/compiler": "5.0.0",
    "@angular/compiler-cli": "5.0.0",
    "@angular/core": "5.0.0",
    "@angular/forms": "5.0.0",
    "@angular/http": "5.0.0",
    "@angular/platform-browser": "5.0.0",
    "@angular/platform-browser-dynamic": "5.0.0",
    "@ionic-native/admob-pro": "^4.12.0",
    "@ionic-native/app-rate": "^4.9.0",
    "@ionic-native/core": "^4.3.1",
    "@ionic-native/email-composer": "^4.9.0",
    "@ionic-native/in-app-browser": "^4.9.0",
    "@ionic-native/native-storage": "^4.9.0",
    "@ionic-native/network": "^4.10.1",
    "@ionic-native/onesignal": "^4.11.0",
    "@ionic-native/social-sharing": "^4.10.1",
    "@ionic-native/splash-screen": "^4.3.1",
    "@ionic-native/status-bar": "^4.3.1",
    "@ionic/storage": "2.1.3",
    "cordova-android": "7.1.1",
    "cordova-ios": "^4.5.2",
    "cordova-plugin-admobpro-firebase": "^2.31.6",
    "cordova-plugin-apprate": "^1.4.0",
    "cordova-plugin-crosswalk-webview": "^2.4.0",
    "cordova-plugin-device": "^1.1.7",
    "cordova-plugin-dialogs": "^2.0.1",
    "cordova-plugin-email-composer": "^0.8.15",
    "cordova-plugin-extension": "^1.5.4",
    "cordova-plugin-globalization": "^1.11.0",
    "cordova-plugin-inappbrowser": "^1.7.2",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^1.2.1",
    "cordova-plugin-nativestorage": "^2.3.2",
    "cordova-plugin-network-information": "^2.0.1",
    "cordova-plugin-splashscreen": "^4.1.0",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-plugin-x-socialsharing": "^5.4.1",
    "es6-promise-plugin": "^4.2.2",
    "ionic-angular": "3.9.2",
    "ionic2-super-tabs": "^4.3.0",
    "ionicons": "3.0.0",
    "onesignal-cordova-plugin": "^2.4.4",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.0",
    "typescript": "~2.4.2"
  },
  "config": {
    "ionic_aot_write_to_disk": true
  },
  "cordova": {
    "platforms": [
      "ios",
      "android"
    ],
    "plugins": {
      "cordova-plugin-crosswalk-webview": {
        "XWALK_VERSION": "22+",
        "XWALK_LITEVERSION": "xwalk_core_library_canary:17+",
        "XWALK_COMMANDLINE": "--disable-pull-to-refresh-effect",
        "XWALK_MODE": "embedded",
        "XWALK_MULTIPLEAPK": "true"
      },
      "cordova-plugin-device": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-nativestorage": {},
      "cordova-plugin-x-socialsharing": {},
      "cordova-plugin-email-composer": {},
      "cordova-plugin-apprate": {},
      "cordova-plugin-network-information": {},
      "onesignal-cordova-plugin": {},
      "cordova-plugin-admobpro-firebase": {}
    }
  }
}

构建时,它告诉我构建成功,但是在手机或模拟器上启动时,它崩溃了。 知道我尝试了cordova-android@6.4.9/7.0.0/7.1.0/7.1.1

1 个答案:

答案 0 :(得分:0)

尝试从设备上卸载您的应用,并在执行“ ionic cordova run android”之前尝试运行“ cordova clean”