Flutter:未连接到 Android Studio 中的 IOS 模拟器 [英] Flutter : Not Connecting to IOS Simulator in Android Studio

查看:46
本文介绍了Flutter:未连接到 Android Studio 中的 IOS 模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注 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屋!

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆