gpt4 book ai didi

ios - React Native iOS 独立版在 react.ShadowQueue 上崩溃

转载 作者:行者123 更新时间:2023-11-28 23:28:18 25 4
gpt4 key购买 nike

开发规范:

  • Expo SDK 版本:3.0.10
  • 工作流程:ExpoKit
  • React Native:0.59.8
  • 平台:iOS/Android

嗨!我为 iOS 和 Android 创建了一个应用程序。 Android 版本很好用,iOS 就不行了。 iOS 在启动后立即崩溃。下面是崩溃日志,我不知道如何调试它:frowning:.

它在模拟器和物理设备中崩溃。我以为可能是 Push Notification,因为它在模拟器上不起作用,我把它注释掉了,仍然老是崩溃。我猜它可能是访问设备存储。该应用程序在初始屏幕之后立即显示 ActivityIndi​​cator,同时查看设备存储以查找已保存的用户 token ,并在 ActivityIndi​​cator 显示几秒钟后崩溃。我知道它不会找到用户 token ,所以如果应该显示登录屏幕,但应用程序在此之前崩溃。我正在使用 expo-secure-store 进行本地存储。

我在 Google Drive 上有两个完整的日志:

Error-log-1.txt

Error-log-2.txt

这是简短的版本:

Thread 3 Crashed:: Dispatch queue: com.facebook.react.ShadowQueue
0 libsystem_kernel.dylib 0x000000010cc9fdda __pthread_kill + 10
1 libsystem_pthread.dylib 0x000000010ccd7797 pthread_kill + 90
2 libsystem_c.dylib 0x000000010ca3188f abort + 127
3 com.myapp.app 0x00000001026ca4db YGVLog(YGConfig*, YGNode*, YGLogLevel, char const*, __va_list_tag*) + 68
4 com.myapp.app 0x00000001026c5d09 YGLog + 155
5 com.myapp.app 0x00000001026cab5a YGBaseline(YGNode*) + 95
6 com.myapp.app 0x00000001026cabee YGBaseline(YGNode*) + 243
7 com.myapp.app 0x00000001026cabee YGBaseline(YGNode*) + 243
8 com.myapp.app 0x00000001026cabee YGBaseline(YGNode*) + 243
9 com.myapp.app 0x00000001026c794a YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 7203
10 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
11 com.myapp.app 0x00000001026cb641 YGNodeComputeFlexBasisForChild(YGNode*, YGNode*, float, YGMeasureMode, float, float, float, YGMeasureMode, YGDirection, YGConfig*, YGMarkerLayoutData&) + 1679
12 com.myapp.app 0x00000001026c6943 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 3100
13 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
14 com.myapp.app 0x00000001026cb641 YGNodeComputeFlexBasisForChild(YGNode*, YGNode*, float, YGMeasureMode, float, float, float, YGMeasureMode, YGDirection, YGConfig*, YGMarkerLayoutData&) + 1679
15 com.myapp.app 0x00000001026c6943 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 3100
16 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
17 com.myapp.app 0x00000001026cb641 YGNodeComputeFlexBasisForChild(YGNode*, YGNode*, float, YGMeasureMode, float, float, float, YGMeasureMode, YGDirection, YGConfig*, YGMarkerLayoutData&) + 1679
18 com.myapp.app 0x00000001026c6943 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 3100
19 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
20 com.myapp.app 0x00000001026cb641 YGNodeComputeFlexBasisForChild(YGNode*, YGNode*, float, YGMeasureMode, float, float, float, YGMeasureMode, YGDirection, YGConfig*, YGMarkerLayoutData&) + 1679
21 com.myapp.app 0x00000001026c6943 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 3100
22 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
23 com.myapp.app 0x00000001026cb641 YGNodeComputeFlexBasisForChild(YGNode*, YGNode*, float, YGMeasureMode, float, float, float, YGMeasureMode, YGDirection, YGConfig*, YGMarkerLayoutData&) + 1679
24 com.myapp.app 0x00000001026c6943 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 3100
25 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
26 com.myapp.app 0x00000001026cb641 YGNodeComputeFlexBasisForChild(YGNode*, YGNode*, float, YGMeasureMode, float, float, float, YGMeasureMode, YGDirection, YGConfig*, YGMarkerLayoutData&) + 1679
27 com.myapp.app 0x00000001026c6943 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 3100
28 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
29 com.myapp.app 0x00000001026cb641 YGNodeComputeFlexBasisForChild(YGNode*, YGNode*, float, YGMeasureMode, float, float, float, YGMeasureMode, YGDirection, YGConfig*, YGMarkerLayoutData&) + 1679
30 com.myapp.app 0x00000001026c6943 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 3100
31 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
32 com.myapp.app 0x00000001026c7d68 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 8257
33 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
34 com.myapp.app 0x00000001026c7d68 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 8257
35 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
36 com.myapp.app 0x00000001026c7d68 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 8257
37 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
38 com.myapp.app 0x00000001026c9274 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 13645
39 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
40 com.myapp.app 0x00000001026c7d68 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 8257
41 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
42 com.myapp.app 0x00000001026c7d68 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 8257
43 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
44 com.myapp.app 0x00000001026c7d68 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 8257
45 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
46 com.myapp.app 0x00000001026c7d68 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 8257
47 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
48 com.myapp.app 0x00000001026c7d68 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 8257
49 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
50 com.myapp.app 0x00000001026c7d68 YGNodelayoutImpl(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, YGConfig*, YGMarkerLayoutData&) + 8257
51 com.myapp.app 0x00000001026c5a56 YGLayoutNodeInternal(YGNode*, float, float, YGDirection, YGMeasureMode, YGMeasureMode, float, float, bool, char const*, YGConfig*, YGMarkerLayoutData&) + 1288
52 com.myapp.app 0x00000001026c9d96 YGNodeCalculateLayout + 846
53 com.myapp.app 0x000000010264a2c3 -[RCTShadowView layoutWithMinimumSize:maximumSize:layoutDirection:layoutContext:] + 217
54 com.myapp.app 0x000000010263e10e -[RCTRootShadowView layoutWithAffectedShadowViews:] + 185
55 com.myapp.app 0x0000000102666163 -[RCTUIManager uiBlockWithLayoutUpdateForRootView:] + 113
56 com.myapp.app 0x000000010266adcd -[RCTUIManager _layoutAndMount] + 380
57 com.myapp.app 0x00000001025e1976 __32-[RCTCxxBridge batchDidComplete]_block_invoke + 52
58 libdispatch.dylib 0x000000010c91f585 _dispatch_call_block_and_release + 12
59 libdispatch.dylib 0x000000010c940792 _dispatch_client_callout + 8
60 libdispatch.dylib 0x000000010c926237 _dispatch_queue_serial_drain + 1022
61 libdispatch.dylib 0x000000010c92698f _dispatch_queue_invoke + 1053
62 libdispatch.dylib 0x000000010c928899 _dispatch_root_queue_drain + 813
63 libdispatch.dylib 0x000000010c92850d _dispatch_worker_thread3 + 113
64 libsystem_pthread.dylib 0x000000010ccd4746 _pthread_wqthread + 1299
65 libsystem_pthread.dylib 0x000000010ccd4221 start_wqthread + 13

非常欢迎任何建议,我不知道从这里去哪里。

谢谢。

最佳答案

您可能会利用世博会来开展项目。执行命令应该是 expo startexpo start -ios or -android

并且您将运行 expo eject 以使用 React native 库。

如果你想运行 iOS 的项目,

  • 确保您拥有最新的 Xcode
  • 如果您还没有,请安装 CocoaPods,这是一个原生的iOS 的依赖项管理器。
  • 从项目的 ios 目录运行 pod install

  1. 然后从项目目录运行 expo start
  2. Xcode 中打开项目的 xcworkspace 文件。
  3. 使用Xcode 构建、安装和运行测试项目设备或模拟器。 (如果您单击Xcode 中的大“播放”按钮。)

关于ios - React Native iOS 独立版在 react.ShadowQueue 上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57835137/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com