【发布时间】:2020-03-25 20:06:41
【问题描述】:
在MacOSX上,当我运行flutter doctor时,终端会显示以下结果:
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.14.5 18F132, locale pt-BR)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
✗ Android SDK file not found: adb.
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
[✓] Android Studio (version 3.6)
[!] VS Code (version 1.40.2)
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected device
! No devices available
! Doctor found issues in 4 categories.
下面的错误很奇怪。
[!] Android 工具链 - 为 Android 设备开发(Android SDK 版本 29.0.3)
✗ 未找到 Android SDK 文件:adb。
- Android SDK 已安装
- 平台工具已安装
- 如果我在终端上运行
adb devices,一切正常,我的设备就会出现。
知道如何解决这个问题吗?
【问题讨论】: