我刚刚设置了Android Studio和Flutter。配置并成功测试了android模拟器,并设置了ios模拟器,xcode和所有当前必需的许可证。 Flutter Doctor也不会发现任何问题。但是,当我尝试在ios模拟器上运行flutter应用程序时,出现错误。看到下面的输出:
Launching lib/main.dart on iPhone Xʀ in debug mode...
[{"event":"app.progress","params":{"appId":"1aa8deab-f765-484d-82f5-7bd49418ffba","id":"0","progressId":null,"message":"Running Xcode build..."}}]Running Xcode build...
Xcode build done. 2.4s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
ld: unknown option: -isysroot
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld failed with exit code 1
Could not build the application for the simulator.
Error launching application on `iPhone Xʀ`.
我尝试从flutter项目文件夹中干净地运行flutter,将flutter通道更改为beta并返回到稳定通道,但这没用。
ios simulator
应该像在android模拟器中一样打开默认的抖动测试应用程序,但是我得到了这个未知选项:-isysroot
错误。
如果我直接在xcode上打开模块并在其中运行flutter应用程序,则效果很好。
有什么想法吗?