我正在用我的M1 MacBook Pro开发一个flutter应用程序,无法使用Android Studio或VS Code的调试器与iOS模拟器(iPhone 14 Pro with iOS 16.2)一起工作。当我尝试在Android Studio中开始调试时,我在控制台中得到以下输出:
Launching lib/main.dart on iPhone 14 Pro in debug mode...
Running Xcode build...
Xcode build done. 9,5s
Debug service listening on ws://127.0.0.1:62652/S84BCtJtulI=/ws
Syncing files to device iPhone 14 Pro...
之后什么也没发生。我试着通过Rosetta运行模拟器,但没有帮助。
它与flutter run
和Xcode本身运行良好,但我想在Android Studio(或VS Code)调试器。
flutter doctor
的结果Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.7.0-13.0.pre.41, on macOS 13.0.1 22A400 darwin-arm64, locale de-DE)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.74.3)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
! Doctor found issues in 1 category.
我做错了什么吗?我错过什么了吗?
确保你优先安装Android工具链,因为它构成了一个关键的组件,可能被忽视了以前