【发布时间】:2021-02-09 15:28:25
【问题描述】:
我正在使用 nativescript-angular 构建一个应用程序。在 Android 上运行时,一切正常。在 iO 上运行时,应用程序在尝试呈现 TabView 时崩溃。我找不到有关此错误的任何信息。有没有人有任何想法?
这是错误:
***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'count' of null
at
_updateIOSTabBarColorsAndFonts(file: node_modules/@nativescript/core/ui/tab-view/index.ios.js:444:23)
at [fontInternal:setNative](file: node_modules/@nativescript/core/ui/tab-view/index.ios.js:494:0)
at applyPendingNativeSetters(file: node_modules/@nativescript/core/ui/core/properties/index.js:1059:0)
at initNativeView(file: node_modules/@nativescript/core/ui/core/properties/index.js:1018:0).
at onResumeNativeUpdates(file: node_modules/@nativescript/core/ui/core/view-base/index.js:695:22)
at _resumeNativeUpdates(file: node_modules/@nativescript/core/ui/core/view-base/index.js:259:0)
at onLoaded(file: node_modules/@nativescript/core/ui/core/view-base/index.js:214:0)
at onLoaded(file: node_modules/@nativescript/core/ui/tab-view/index.ios.js:268:0)
at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:297:0)
at callFunctionWithSuper(file: node_modules/@nativescript/core/ui/core/view-base/index.js:291:0)
at callLoaded(file: node_modules/@nativescript/core/ui/core/view-base/index.js:297:0)
at loadView(file: node_modules/@nativescript/core/ui/core/view-base/index.js:437:0)
at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:216:0)
at eachChildView(file: node_modules/@nativescript/core/ui/layouts/layout-base-common.js:101:0)
at eachChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:700:0)
at onLoaded(file: node_modules/@nativescript/core/ui/core/view-base/index.js:215:0)
at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:297:0)
at callFunctionWithSuper(file:///app/vendor.js:11791
我使用的是 tns 版本 7.2.0
tns --version
7.2.0
这是我的 package.json
{
"name": "@nativescript/template-hello-world-ng",
"main": "main.js",
"version": "7.0.8",
"author": "NativeScript Team <oss@nativescript.org>",
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"publishConfig": {
"access": "public"
},
"keywords": [
"nativescript",
"mobile",
"angular",
"{N}",
"template"
],
"repository": "<fill-your-repository-here>",
"bugs": {
"url": "https://github.com/NativeScript/NativeScript/issues"
},
"dependencies": {
"@angular/animations": "~11.0.0",
"@angular/common": "~11.0.0",
"@angular/compiler": "~11.0.0",
"@angular/core": "~11.0.0",
"@angular/forms": "~11.0.0",
"@angular/platform-browser": "~11.0.0",
"@angular/platform-browser-dynamic": "~11.0.0",
"@angular/router": "~11.0.0",
"@nativescript/angular": "10.0.0",
"@nativescript/core": "^7.2.1",
"@nativescript/firebase": "^11.1.3",
"@nativescript/theme": "~3.0.0",
"nativescript-carousel": "^7.0.1",
"nativescript-fontawesome": "^1.0.0",
"nativescript-ngx-fonticon": "^7.0.0",
"nativescript-ui-dataform": "^7.0.4",
"reflect-metadata": "~0.1.12",
"rxjs": "^6.6.0",
"sass": "^1.32.6",
"zone.js": "~0.11.1"
},
"devDependencies": {
"@angular/compiler-cli": "~11.0.0",
"@nativescript/android": "7.0.1",
"@nativescript/ios": "7.2.0",
"@nativescript/types": "~7.0.0",
"@nativescript/webpack": "~3.0.0",
"@ngtools/webpack": "~11.0.0",
"typescript": "~4.0.0"
},
"gitHead": "41a7254d3bc134fd3c258761f3c6e1c3d54e6d41",
"private": "true",
"readme": "NativeScript Application"
}
【问题讨论】:
标签: ios nativescript nativescript-angular