简体   繁体   English

Flutter Doctor --android-licenses 在没有 Android Studio 的情况下找不到 sdkmanager

[英]Flutter doctor --android-licenses not finding sdkmanager without Android Studio

I'm trying to get my very first Flutter application up and running.我正在尝试启动并运行我的第一个 Flutter 应用程序。 When I ran flutter doctor it was saying that I was missing Android SDK, so I installed sdkmanager and ran:当我运行flutter doctor时,它说我缺少 Android SDK,所以我安装了 sdkmanager 并运行:

sdkmanager "platform-tools" "platform;android-29" "build-tools;28.0.3" 

From there I ran flutter config --android-sdk /opt/android-sdk从那里我跑了flutter config --android-sdk /opt/android-sdk

I got an error saying that I'm missing cmdline-tools, however I don't have Android Studio and don't want to as well.我收到一条错误消息,提示我缺少 cmdline-tools,但是我没有 Android Studio,也不想拥有。 So I went on Android Studio's website and downloaded a manual cmdline-tools and moved the file to android-sdk.所以我去了 Android Studio 的网站,下载了一个手动的 cmdline-tools 并将文件移动到 android-sdk。 OK so far so good, right?好的,到目前为止一切都很好,对吧? No, now I needed to run flutter doctor --android-licenses and it's saying Android sdkmanager not found.不,现在我需要运行flutter doctor --android-licenses并且它说找不到 Android sdkmanager。 Why?为什么? Is there something I'm missing?有什么我想念的吗? I'm doing all of this in Ubuntu.我在 Ubuntu 中完成所有这些工作。

  • Below is the image of flutter doctor status下面是flutter医生状态图
  • Shows me running flutter doctor --android-licenses显示我正在运行颤振医生 --android-licenses
  • As well as shows the path to the android-sdk in the terminal以及在终端中显示 android-sdk 的路径
  • I have as well set flutter config --android-sdk to the correct path and is the reason why flutter doctor has no issues with finding the android-sdk我也将颤振配置 --android-sdk 设置为正确的路径,这就是颤振医生在找到 android-sdk 时没有问题的原因

Image!!图片!!

Android toolchain - develop for Android devices X cmdline-tools component is missing run path/to/sdkmanager --install "cmdline-tools;latest" Android toolchain - developAndroid设备开发 X cmdline-tools组件缺少运行path/to/sdkmanager --install "cmdline-tools;latest"

This error means your "Android SDK Command-line Tools are missing"此错误表示您的"Android SDK Command-line Tools

  1. Open Android Studio打开安卓工作室
  2. In the Menu bar , click Tools(4th last)在菜单栏中,单击工具(倒数第四个)
  3. choose SDK Tools panel选择 SDK 工具面板
  4. Tick Android SDK Command-line Tools勾选 Android SDK 命令行工具
  5. Click Apply at bottom of the window单击窗口底部的应用

I gave up and just downloaded android studio using snap package manager and within android studio I did the steps discussed above.我放弃了,只是使用 snap 包管理器下载了 android studio,并在 android studio 中完成了上面讨论的步骤。

After downloading cmdline-tools from android studio.从 android studio 下载 cmdline-tools 后。 I have just set the android config --android-sudio-dir "toMyAndroidStudioPath" example.我刚刚设置了 android config --android-sudio-dir "toMyAndroidStudioPath" 示例。 /home/myName/Android/Sdk.... /home/myName/Android/Sdk....

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM