scoop为flutter 配置android-sdk

发布于 2022-09-13 01:24:47 字数 3399 浏览 35 评论 0

我不想安装一个Android Studio 来为Flutter 配置 Android-sdk

所以使用了 Scoop 安装 Android-sdk

已使用了Flutter官网安装了 Flutter

已用 Scoop 安装了 adopt8-hotspot-jre

但是 Flutter doctor -v

[√] Flutter (Channel stable, 2.0.3, on Microsoft Windows [Version 10.0.19043.1200], locale zh-CN)
    • Flutter version 2.0.3 at E:\flutter
    • Framework revision 4d7946a68d (5 months ago), 2021-03-18 17:24:33 -0700
    • Engine revision 3459eb2436
    • Dart version 2.12.2
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[!] Android toolchain - develop for Android devices
    • Android SDK at C:\Users\Administrator\scoop\apps\android-sdk\current
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

    • ANDROID_HOME = C:\Users\Administrator\scoop\apps\android-sdk\current
    X No valid Android SDK platforms found in C:\Users\Administrator\scoop\apps\android-sdk\current\platforms. Directory was empty.
    • Try re-installing or updating your Android SDK,
      visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.

[√] Chrome - develop for the web
    • Chrome at C:\Users\Administrator\AppData\Local\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19043.1200]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 92.0.4515.159
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 92.0.902.78

! Doctor found issues in 3 categories.

No valid Android SDK platforms found in C:\Users\Administrator\scoop\apps\android-sdk\current\platforms. Directory was empty. 提示 platforms 路径为空,不知道是需要安装什么?

sdkmanager --list

 sdkmanager --list
Warning: File C:\Users\Administrator\.android\repositories.cfg could not be loaded.
Installed packages:=====================] 100% Computing updates...
  Path           | Version | Description                       | Location
  -------        | ------- | -------                           | -------
  platform-tools | 31.0.3  | Android SDK Platform-Tools 31.0.3 | platform-tools\
  tools          | 26.1.1  | Android SDK Tools 26.1.1          | tools\

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

涫野音 2022-09-20 01:24:47
  Path                                                  | Version | Description                                | Location
  -------                                               | ------- | -------                                    | -------
  build-tools;31.0.0                                    | 31.0.0  | Android SDK Build-Tools 31                 | build-tools\31.0.0\
  emulator                                              | 30.8.4  | Android Emulator                           | emulator\
  patcher;v4                                            | 1       | SDK Patch Applier v4                       | patcher\v4\
  platform-tools                                        | 31.0.3  | Android SDK Platform-Tools 31.0.3          | platform-tools\
  platforms;android-30                                  | 3       | Android SDK Platform 30                    | platforms\android-30\
  sources;android-30                                    | 1       | Sources for Android 30                     | sources\android-30\
  tools                                                 | 26.1.1  | Android SDK Tools 26.1.1                   | tools\

这是我的配置,你应该是少了 platforms;android-30 类似的kit吧

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文