【问题标题】:getting error on IOS nativescript. but working on android在 IOS nativescript 上出现错误。但在安卓上工作
【发布时间】:2021-07-16 08:03:17
【问题描述】:

***** 致命的 JavaScript 异常 - 应用程序已终止。 ***** NativeScript 遇到致命错误:Uncaught TypeError: Cannot set property 'titleTextAttributes' of undefined 在 setColor(文件:node_modules/@nativescript/core/ui/action-bar/index.ios.js:264:0) 在 [color:setNative](文件:node_modules/@nativescript/core/ui/action-bar/index.ios.js:355:0) 在 applyAllNativeSetters(文件:node_modules/@nativescript/core/ui/core/properties/index.js:1094:0) 在 initNativeView(文件:node_modules/@nativescript/core/ui/core/properties/index.js:1021:0) 在 onResumeNativeUpdates(文件:node_modules/@nativescript/core/ui/core/view-base/index.js:695:22) 在 _resumeNativeUpdates(文件:node_modules/@nativescript/core/ui/core/view-base/index.js:259:0) 在 onLoaded(文件:node_modules/@nativescript/core/ui/core/view-base/index.js:214:0) 在(文件:node_modules/@nativescript/core/ui/core/view-base/index.js:297:0) 在 callFunctionWithSuper(文件:node_modules/@nativescript/core/ui/core/view-base/index.js:291:0) 在 callLoaded(文件:node_modules/@nativescript/core/ui/core/view-base/index.js:297:0) 在 loadView(文件:node_modules/@nativescript/core/ui/core/view-base/index.js:437:0) 在(文件:node_modules/@nativescript/core/ui/core/view-base/index.js:216:0) 在每个ChildView(文件:node_modules/@nativescript/core/ui/page/page-common.js:100:0) 在每个孩子(文件:node_modules/@nativescript/core/ui/core/view/view-common.js:700:0) 在 onLoaded(文件:node_modules/@nativescript/core/ui/core/view-base/index.js:215:0) 在 onLoaded(文件:node_modules/@nativescript/core/ui/page/index.ios.js:312:0) 在(文件:node_modules/@nativescript/core/ui/core/view-base/index.js:297:0) 在 callFunctionWithSuper(文件:node_modules/@nativescript/core/ui/core/view-base/index.js:291:0) 在呼叫Lo

您好,我正在使用 nativescript 开发移动应用程序。我的应用程序都很好并且在 android 上运行。但是当我尝试在 IOS 设备/模拟器上运行它时,我得到了这个错误。无法弄清楚错误是什么。 当我尝试点击将我导航到另一个页面的按钮时出现此错误。 有人可以给我建议吗。

谢谢

【问题讨论】:

    标签: angular native nativescript-angular


    【解决方案1】:

    可能您正在使用 nativescript/theme 并加载 node-sass、sass-loader。 Nativescript 主题想要设置引发异常的 Actionbar 的样式。

    我设法通过从 dev 中删除 node-sass、sass-loader、将 nativescript/theme 更新到 3.0.1、更新到 webpack 3.0.9 并将 sass 1.32.8 添加到 dev 来解决这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-21
      • 2017-11-17
      • 2023-03-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多