ios 博览会 - “启动设备时无法确定运行时包”

Joh*_*her 26 ios react-native expo

尝试在 Macbook(2012 年中)上启动 expo 项目,出现以下错误:

*** -SimDevice _onBootstrapQueue_bootWithOptions:error:, SimDevice.m:2057 2021-12-25 21:21:29.751 simctl[3424:48740] 中断言失败 *** 由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“启动设备时无法确定运行时包。”

我该如何解决?提前致谢。

> expo start --ios

Starting project at /Users/johngfisher/App
Developer tools running on http://localhost:19002
Starting Metro Bundler
xcrun exited with signal: SIGABRT
2021-12-25 21:21:29.748 simctl[3424:48740] *** Assertion failure in -[SimDevice _onBootstrapQueue_bootWithOptions:error:](), SimDevice.m:2057
2021-12-25 21:21:29.751 simctl[3424:48740] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to determine runtime bundle when booting device.'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007fff2f046727 __exceptionPreprocess + 250
        1   libobjc.A.dylib                     0x00007fff6807da9e objc_exception_throw + 48
        2   CoreFoundation                      0x00007fff2f06fa40 +[NSException raise:format:arguments:] + 88
        3   Foundation                          0x00007fff317c23c6 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
        4   CoreSimulator                       0x00000001063db543 -[SimDevice _onBootstrapQueue_bootWithOptions:error:] + 1915
        5   CoreSimulator                       0x00000001063dadab __35-[SimDevice bootWithOptions:error:]_block_invoke + 64
        6   CoreSimulator                       0x00000001063f2c10 __32-[SimDevice bootstrapQueueSync:]_block_invoke + 16
        7   libdispatch.dylib                   0x00007fff691c4658 _dispatch_client_callout + 8
        8   libdispatch.dylib                   0x00007fff691d06ec _dispatch_lane_barrier_sync_invoke_and_complete + 60
        9   CoreSimulator                       0x00000001063f2ba3 -[SimDevice bootstrapQueueSync:] + 169
        10  CoreSimulator                       0x00000001063dac65 -[SimDevice bootWithOptions:error:] + 178
        11  simctl                              0x000000010629f62a simctl + 169514
        12  simctl                              0x00000001062ab365 simctl + 217957
        13  libdispatch.dylib                   0x00007fff691c36c4 _dispatch_call_block_and_release + 12
        14  libdispatch.dylib                   0x00007fff691c4658 _dispatch_client_callout + 8
        15  libdispatch.dylib                   0x00007fff691d2aa8 _dispatch_root_queue_drain + 663
        16  libdispatch.dylib                   0x00007fff691d3097 _dispatch_worker_thread2 + 92
        17  libsystem_pthread.dylib             0x00007fff694229f7 _pthread_wqthread + 220
        18  libsystem_pthread.dylib             0x00007fff69421b77 start_wqthread + 15
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Error: xcrun exited with signal: SIGABRT
    at ChildProcess.completionListener (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:64:13)
    at Object.onceWrapper (events.js:418:26)
    at ChildProcess.emit (events.js:311:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
    ...
    at spawnAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
    at xcrunAsync (/usr/local/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:427:18)
    at runBootAsync (/usr/local/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:217:11)
    at bootAsync (/usr/local/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:189:9)
    at action (/usr/local/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:142:19)
    at waitForActionAsync (/usr/local/lib/node_modules/expo-cli/node_modules/xdl/src/apple/utils/waitForActionAsync.ts:17:22)
    at waitForDeviceToBootAsync (/usr/local/lib/node_modules/expo-cli/node_modules/xdl/src/SimControl.ts:141:10)
    at /usr/local/lib/node_modules/expo-cli/node_modules/xdl/src/utils/profileMethod.ts:22:21
    at ensureSimulatorOpenAsync (/usr/local/lib/node_modules/expo-cli/node_modules/xdl/src/Simulator.ts:233:30)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Run Code Online (Sandbox Code Playgroud)

sky*_*lkr 97

我已经成功解决了这个问题:

  1. 使用以下命令单独启动模拟器:open -a Simulator
  2. 此后,如果您expo start再次运行并键入,i模拟器将正常启动。


cse*_*lus 7

有完全相同的问题。我的问题是,除了 iOS Simulator 之外,我还需要手动安装 iOS(下面 Xcode 设置平台选项卡上的第三项)。

Xcode 设置