【问题标题】:ionic 3 issue : *** Terminating app due to uncaught exceptionionic 3 问题:*** 由于未捕获的异常而终止应用程序
【发布时间】:2019-07-28 19:36:06
【问题描述】:

伙计们,我正在从事一个离子项目,我们在这个问题上被困了很长时间:

[1230:250895] * 由于未捕获的异常 'NSInvalidArgumentException' 导致应用程序终止,原因:'* -[__NSArrayM insertObject:atIndex:]: object cannot be nil'

libc++abi.dylib:以 NSException 类型的未捕获异常终止

我们不知道错误来自哪里,通过使用断点,这是错误部分:

int main(int argc, char* argv[])
{
    @autoreleasepool {
        int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
    return retVal;
    }
}

我认为这是一个包问题,但这是我的 package.json

{
  "name": "discover_v2",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint"
  },
  "dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/barcode-scanner": "^4.16.0",
    "@ionic-native/camera": "^4.17.0",
    "@ionic-native/core": "~4.15.0",
    "@ionic-native/device": "^5.2.0",
    "@ionic-native/facebook": "^4.17.0",
    "@ionic-native/fcm": "^4.18.0",
    "@ionic-native/file-transfer": "^4.17.0",
    "@ionic-native/firebase": "^4.18.0",
    "@ionic-native/http": "^4.17.0",
    "@ionic-native/in-app-browser": "^4.17.0",
    "@ionic-native/local-notifications": "^4.18.0",
    "@ionic-native/splash-screen": "~4.15.0",
    "@ionic-native/status-bar": "~4.15.0",
    "@ionic/pro": "2.0.3",
    "@ionic/storage": "2.2.0",
    "cordova-android": "7.1.4",
    "cordova-browser": "5.0.4",
    "cordova-ios": "5.0.0",
    "cordova-plugin-advanced-http": "^2.0.1",
    "cordova-plugin-android-support-v13": "git+https://github.com/nnexai/cordova-plugin-android-support-v13.git",
    "cordova-plugin-camera": "4.0.3",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-facebook4": "1.7.4",
    "cordova-plugin-file": "^6.0.1",
    "cordova-plugin-file-transfer": "1.7.1",
    "cordova-plugin-firebase": "2.0.5",
    "cordova-plugin-inappbrowser": "3.0.0",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^2.2.0",
    "cordova-plugin-local-notifications": "1.0.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "ngx-qrcode2": "0.0.9",
    "phonegap-plugin-barcodescanner": "^8.0.0",
    "rxjs": "5.5.11",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.0",
    "@ionic/lab": "1.0.22",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "phonegap-plugin-barcodescanner": {
        "CAMERA_USAGE_DESCRIPTION": "Scan QR-Codes",
        "PHOTOLIBRARY_USAGE_DESCRIPTION": "App would like to access the library.",
        "PHOTO_LIBRARY_USAGE_DESCRIPTION": "App would like to access the library."
      },
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
       },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-advanced-http": {},
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-firebase": {},
      "cordova-plugin-camera": {
        "CAMERA_USAGE_DESCRIPTION": "Scan QR-Codes",
        "PHOTOLIBRARY_USAGE_DESCRIPTION": "App would like to access the library.",
        "PHOTO_LIBRARY_USAGE_DESCRIPTION": "App would like to access the library."
      },
      "cordova-plugin-facebook4": {
        "APP_ID": "338050196981589",
        "APP_NAME": "usediscover"
      },
      "cordova-plugin-statusbar": {},
      "cordova-plugin-inappbrowser": {}
     },
     "platforms": [
       "browser",
       "android",
       "ios"
     ]
  }
}

【问题讨论】:

    标签: ios cordova ionic-framework


    【解决方案1】:
    猜你喜欢
    • 2021-01-29
    • 2018-06-05
    • 2015-08-20
    • 2014-11-03
    • 2014-01-05
    • 2015-09-21
    相关资源
    最近更新 更多