Flutter:未连接到 Android Studio 中的 IOS 模拟器 [英] Flutter : Not Connecting to IOS Simulator in Android Studio
问题描述
我正在关注 Flutter Docs 上的 Flutter Test Drive 教程.我安装了 XCode,cocoapods,运行 pods setup
等.
I am following the Flutter Test Drive tutorial on the Flutter Docs. I installed XCode, cocoapods, ran pods setup
etc.
但是,在 Android Studio 中,当我尝试通过单击运行 IOS 模拟器"来运行 IOS 时,它会打开模拟器但无法连接.
However, in Android Studio, when I try to run IOS by clicking "Run IOS Simulator," it opens the simulator but fails to connect.
我也尝试从终端执行此操作.打开一个IOS模拟器,然后在终端的app文件夹中运行flutter run
.我收到一个错误没有附加设备.
I also tried doing this from the terminal. Opened an IOS emulator and then ran flutter run
in the app folder in terminal. I got an error No devices attached.
推荐答案
请检查您是否安装了最新版本的Xcode.
Please check whether you installed the latest version of Xcode.
安装完成后,尝试运行以下命令.
After the installation, try to run the following command.
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
这篇关于Flutter:未连接到 Android Studio 中的 IOS 模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!