Reputation: 3370
On MacOSX, when I run flutter doctor
, the following result is shown in the terminal:
[✓] 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.
The line following error is strange.
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
✗ Android SDK file not found: adb.
adb devices
on my terminal, everything works fine and my device appears.Any idea on how to fix this?
Upvotes: 0
Views: 2191
Reputation: 3370
So I fixed in a very strange way:
Seems like some new version of Android SDK moved adb from /sdk/platform-tools to /sdk/platform-tools/platform-tools
To fix, I've only moved adb from /sdk/platform-tools/platform-tools to /sdk/platform-tools and now it's working.
Upvotes: 2
Reputation: 2340
Starting with the less complex fix;
flutter config --android-sdk <path-to-your-android-sdk-path>
. Else you can use android studio to download the required Android SDK. See location in pictureflutter doctor -v
and everything will be good.NOTE: you don't need adb
in mac for flutter to compile on android. downloading an Android SDK will install qemu
. You will also notice some significate process load while running an Android emulator because of the running qemu
process since it is not very optimized fro mac. But that is not an issue you will get use to or just use a real android device. Install Xcode will install all Iphones simulators.
Upvotes: 0