提问者:小点点

在iOS模拟器上运行Flutter应用程序失败


在iPhone13以调试模式启动lib/main. dart…lib/main.dart:1

构建iOS应用程序失败Xcode构建的错误输出:

{ platform:iOS Simulator, id:9FC2EBC0-2F79-46FA-BA02-74AF9E983256, OS:15.0, name:iPad (9th generation) }
{ platform:iOS Simulator, id:6451BCB2-F879-471E-BDBA-84028CB6FA39, OS:15.0, name:iPad Air (4th generation) }
{ platform:iOS Simulator, id:C50BA8AA-7C66-4E71-B6FD-FAA91921DAB2, OS:15.0, name:iPad Pro (9.7-inch) }
{ platform:iOS Simulator, id:92C701E1-FE17-4476-9322-5E0DDBCDC2A4, OS:15.0, name:iPad Pro (11-inch) (3rd generation) }
{ platform:iOS Simulator, id:EBDE3FF9-77D1-4640-B4AA-5AA737679AF0, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) }
{ platform:iOS Simulator, id:EF18A07F-4AE5-4CB0-ACE8-12CB110EC024, OS:15.0, name:iPad mini (6th generation) }
{ platform:iOS Simulator, id:F301D88A-0C3E-40D5-83E9-A3B1A6A282BB, OS:15.0, name:iPhone 8 }
{ platform:iOS Simulator, id:F487FBA6-0100-4F1E-89E1-B48ECE2F0CBD, OS:15.0, name:iPhone 8 Plus }
{ platform:iOS Simulator, id:54D0F08B-86FE-45DB-9C99-768453DB210D, OS:15.0, name:iPhone 11 }
{ platform:iOS Simulator, id:D970D1F0-7ED7-40E0-ABFF-C404CE5FEBDC, OS:15.0, name:iPhone 11 Pro }
{ platform:iOS Simulator, id:9AB42147-2B5E-4017-B1C7-6CC5EE5E85CF, OS:15.0, name:iPhone 11 Pro Max }
{ platform:iOS Simulator, id:B737CEDF-BF28-4994-A1ED-05A6A7FEC6DE, OS:15.0, name:iPhone 12 }
{ platform:iOS Simulator, id:25BD1799-1BCC-4603-A4E5-DC366211BA62, OS:15.0, name:iPhone 12 Pro }
{ platform:iOS Simulator, id:D3D62501-D476-4C99-BE48-2B171F36C0CB, OS:15.0, name:iPhone 12 Pro Max }
{ platform:iOS Simulator, id:C3A1402B-51B6-46EA-B8D4-6DAD5E227153, OS:15.0, name:iPhone 12 mini }
{ platform:iOS Simulator, id:C448204D-92C7-467C-8ABE-C1069BDEED3A, OS:15.0, name:iPhone 13 }
{ platform:iOS Simulator, id:CAA6C8F0-AD9F-4459-A312-2F7C71FF4879, OS:15.0, name:iPhone 13 Pro }
{ platform:iOS Simulator, id:A8095915-4FE9-40B8-A47C-3B93C1CC84F9, OS:15.0, name:iPhone 13 Pro Max }
{ platform:iOS Simulator, id:C541B6B6-2D11-4A95-B6C1-EAC9E891A537, OS:15.0, name:iPhone 13 mini }
{ platform:iOS Simulator, id:1CBFEDD7-4ACE-4234-ACC3-940163D07ADA, OS:15.0, name:iPhone SE (2nd generation) }
{ platform:iOS Simulator, id:693F9141-6977-41DE-AD27-2D3758282BA2, OS:15.0, name:iPod touch (7th generation) }
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
** BUILD FAILED **

Xcode的输出:

是否有办法强制运行特定的模拟器或任何提示来清除此问题。


共1个答案

匿名用户

升级到Flutter 2.2.3稳定频道后,我也遇到了同样的问题。这样做后,它现在运行良好:

flutter clean

删除iOS文件夹中的Podfile. lock

Checking packages updates

flutter run

注意:确保iOS: 13.0

如果这些步骤没有帮助;尝试切换到稳定频道:

flutter channel stable