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
.我收到错误No devices attached.
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 installation, Try to run the following command.
sudo xcode-select --switch/Applications/Xcode.app/Contents/Developer
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
这篇关于Flutter:未连接到Android Studio中的IOS模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!