[英]Flutter app does not run on iOS simulator
我一直在为 android 和 iOS 开发一个应用程序,该应用程序在 Android 设备上运行良好,但是当我尝试在 iOS 设备上运行时出现一些错误。 我将 xcode 和开发人员工具更新到最新版本,正如在类似问题中所建议的那样,但它们都不适合我。
Launching lib/main.dart on iPhone 13 in debug mode...
Running Xcode build...
└─Compiling, linking and signing... 5,0s
Xcode build done. 28,8s
Failed to build iOS app
Error output from Xcode build:
↳
2022-07-11 18:35:57.582 xcodebuild[15576:52607] Requested but did not find extension point with identifier
Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in
com.apple.dt.IDEWatchSupportCore
2022-07-11 18:35:57.583 xcodebuild[15576:52607] Requested but did not find extension point with identifier
Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in
com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/hn/zclkrvcx6z727_k0rssl_1x00000gn/T/flutter_tools.xkj85b/flutter_ios_build_temp_direwEhYz/temporary_xcresult_bundle
/Users/haldiz/Library/Developer/Xcode/DerivedData/Runner-bxvlefboatfugfbdpodmkzmhtotl/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runne
r.build/Script-014E83FBDAF3F33F05F23D32.sh: line 2: /Users/haldiz/Downloads/projectmain/ios/Pods/Target Support
Files/Pods-Runner/Pods-Runner-frameworks.sh: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/haldiz/Downloads/projectmain/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'leveldb-library' from project 'Pods')
Result bundle written to path:
/var/folders/hn/zclkrvcx6z727_k0rssl_1x00000gn/T/flutter_tools.xkj85b/flutter_ios_build_temp_direwEhYz/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone 13.
到目前为止我为解决这个问题所做的工作(但失败了):
不幸的是,他们都没有工作。
编辑1:
从零开始,我设法将应用程序安装到模拟器,但崩溃了:
Date/Time: 2022-07-13 15:27:24.5135 +0300
Launch Time: 2022-07-13 15:27:24.1819 +0300
OS Version: macOS 12.4 (21F79)
Release Type: User
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x7fff20420ae6 __exceptionPreprocess + 226
1 libobjc.A.dylib 0x7fff20177e78 objc_exception_throw + 48
2 UIKitCore 0x7fff24816dc2 -[UIStoryboard name] + 0
3 UIKitCore 0x7fff24695507 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 75
4 UIKitCore 0x7fff24695aa6 -[UIApplication _loadMainInterfaceFile] + 274
5 UIKitCore 0x7fff24694577 -[UIApplication _runWithMainScene:transitionContext:completion:] + 971
6 UIKitCore 0x7fff23cbd907 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
7 UIKitCore 0x7fff2424bdb6 _UIScenePerformActionsWithLifecycleActionMask + 88
8 UIKitCore 0x7fff23cbe416 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
9 UIKitCore 0x7fff23cbde28 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 296
10 UIKitCore 0x7fff23cbe247 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 819
11 UIKitCore 0x7fff23cbdadb -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
12 UIKitCore 0x7fff23cc5d73 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 178
13 UIKitCore 0x7fff241556ab +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 871
14 UIKitCore 0x7fff2426865e _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
15 UIKitCore 0x7fff23cc5a79 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 361
16 UIKitCore 0x7fff23ae896f __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 797
17 UIKitCore 0x7fff23ae7419 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 253
18 UIKitCore 0x7fff23ae85a8 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 208
19 UIKitCore 0x7fff24692b20 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 508
20 UIKitCore 0x7fff2417dab7 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 358
21 FrontBoardServices 0x7fff25aa20ae -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 391
22 FrontBoardServices 0x7fff25acab41 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.176 + 102
23 FrontBoardServices 0x7fff25aafad5 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
24 FrontBoardServices 0x7fff25aca80f __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 352
25 libdispatch.dylib 0x7fff20106508 _dispatch_client_callout + 8
26 libdispatch.dylib 0x7fff20109052 _dispatch_block_invoke_direct + 281
27 FrontBoardServices 0x7fff25af07a5 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
28 FrontBoardServices 0x7fff25af048b -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
29 FrontBoardServices 0x7fff25af0950 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
30 CoreFoundation 0x7fff2038f38a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
31 CoreFoundation 0x7fff2038f282 __CFRunLoopDoSource0 + 180
32 CoreFoundation 0x7fff2038e764 __CFRunLoopDoSources0 + 248
33 CoreFoundation 0x7fff20388f2f __CFRunLoopRun + 878
34 CoreFoundation 0x7fff203886d6 CFRunLoopRunSpecific + 567
35 GraphicsServices 0x7fff2bededb3 GSEventRunModal + 139
36 UIKitCore 0x7fff24690e0b -[UIApplication _run] + 912
37 UIKitCore 0x7fff24695cbc UIApplicationMain + 101
38 Runner 0x105fd8dff main + 63 (AppDelegate.swift:6)
39 dyld 0x10dd5751e start + 462
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x7fff60c5900e __pthread_kill + 10
1 libsystem_pthread.dylib 0x7fff60c9a1ff pthread_kill + 263
2 libsystem_c.dylib 0x7fff200fab94 abort + 120
3 libc++abi.dylib 0x7fff20252818 abort_message + 231
4 libc++abi.dylib 0x7fff20243e7d demangling_terminate_handler() + 266
5 libobjc.A.dylib 0x7fff201780d1 _objc_terminate() + 96
6 libc++abi.dylib 0x7fff20251c47 std::__terminate(void (*)()) + 8
7 libc++abi.dylib 0x7fff20251be9 std::terminate() + 41
8 libdispatch.dylib 0x7fff2010651c _dispatch_client_callout + 28
9 libdispatch.dylib 0x7fff20109052 _dispatch_block_invoke_direct + 281
10 FrontBoardServices 0x7fff25af07a5 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
11 FrontBoardServices 0x7fff25af048b -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
12 FrontBoardServices 0x7fff25af0950 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
13 CoreFoundation 0x7fff2038f38a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
14 CoreFoundation 0x7fff2038f282 __CFRunLoopDoSource0 + 180
15 CoreFoundation 0x7fff2038e764 __CFRunLoopDoSources0 + 248
16 CoreFoundation 0x7fff20388f2f __CFRunLoopRun + 878
17 CoreFoundation 0x7fff203886d6 CFRunLoopRunSpecific + 567
18 GraphicsServices 0x7fff2bededb3 GSEventRunModal + 139
19 UIKitCore 0x7fff24690e0b -[UIApplication _run] + 912
20 UIKitCore 0x7fff24695cbc UIApplicationMain + 101
21 Runner 0x105fd8dff main + 63 (AppDelegate.swift:6)
22 dyld 0x10dd5751e start + 462
打开 podfile 取消注释平台并将值更改为 11.0。 运行 pod 安装。 在 xcode 中打开 xcworkspave 文件。 转到项目并清理构建文件夹。 如果您看到任何警告图标,则在顶部。 请单击它并解决这些警告。 从 xcode 运行一次,如果它可以工作,那么所有后续构建都应该从你的 ide 工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.