ios 的expo -“启动设备时无法确定运行时包”

问题描述 投票:0回答:4
尝试在 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)
    
ios react-native expo
4个回答
99
投票
我已经成功解决了这个问题:

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

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


0
投票
就我而言,较旧的 XCode 导致了该问题。删除它也会消灭它的模拟器,从而解决了这个问题。对于那些不需要两个版本的人来说,这可能会有所帮助。


0
投票
就我而言,skywlkr 可以工作,但只有在我更新 Xcode 之后。

© www.soinside.com 2019 - 2024. All rights reserved.