未找到Android SDK文件:MacOSX上的adb
在MacOSX上,当我运行未找到Android SDK文件:MacOSX上的adb,android,flutter,Android,Flutter,在MacOSX上,当我运行flatter 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.
flatter 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
adb设备
,一切正常,我的设备就会出现有没有关于如何解决这个问题的想法?从不太复杂的解决方案开始
注意:您不需要mac中的
adb
就可以在android上编译颤振。下载Android SDK将安装qemu
。由于运行qemu
进程,在运行Android仿真器时,您还将注意到一些重要的进程负载,因为它对mac不是非常优化。但这并不是一个你会习惯或仅仅使用真正的android设备的问题。Install Xcode将安装所有iPhone模拟器。所以我用一种非常奇怪的方式修复了这个问题:
似乎安卓SDK的一些新版本已从/SDK/platform tools移动到/SDK/platform tools/platform tools
为了解决这个问题,我只将adb从/sdk/platform tools/platform tools移动到了/sdk/platform tools,现在它开始工作了