问题
I am following the Flutter Test Drive tutorial on the Flutter Docs. I installed XCode, cocoapods, ran pods setup
etc.
However, in Android Studio, when I try to run IOS by clicking "Run IOS Simulator," it opens the simulator but fails to connect.
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.
回答1:
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
回答2:
I came across this problem on my MacBook.
iOS toolchain - develop for iOS devices (Xcode 8.2.1) ✗ Flutter requires a minimum Xcode version of 9.0.0. Download the latest version or update via the Mac App Store.
Xcode was not updated. That is why IOS simulators are not supported.
来源:https://stackoverflow.com/questions/50318475/flutter-not-connecting-to-ios-simulator-in-android-studio