Android许可证状态未知,没有Android Studio

nkkqxpd9  于 2023-04-28  发布在  Android
关注(0)|答案(1)|浏览(141)

我想在没有Android Studio的情况下安装Flutter。所以,我手动安装了Android SDK。当我运行“sdkmanager --licenses”时,结果是:

~$ sdkmanager --licenses
[=======================================] 100% Computing updates...             
All SDK package licenses accepted.

之后,我运行“Flutter医生-v”。结果:

$ flutter doctor -v
[✓] Flutter (Channel stable, 3.7.12, on Ubuntu 22.04.2 LTS 5.19.0-40-generic,
    locale en_US.UTF-8)
    • Flutter version 3.7.12 on channel stable at /home/nisa/Android/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4d9e56e694 (6 days ago), 2023-04-17 21:47:46 -0400
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /home/nisa/Android
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.18+10-post-Ubuntu-0ubuntu122.04)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for
      more details.

所以我运行这个命令flutter doctor --android-licenses。它说:

Android sdkmanager not found. Update to the latest Android SDK and ensure that
the cmdline-tools are installed to resolve this.

我已经安装了cmdline-tools,但为什么仍然得到这个错误?我已经观看或阅读了有关如何解决这个问题的教程,但他们都使用Android Studio,而不是像我一样手动安装.
想要解决“Android许可证状态未知”的问题,并在没有Android Studio的情况下将Flutter安装在我的PC上

vc9ivgsu

vc9ivgsu1#

错误提示Android Studio没有cmdline-tools SDK工具,需要安装

  • Android Studio设置
  • 导航到Android SDK。
  • 转到SDK工具选项卡。

您将找到Android SDK Command-line Tools安装它并重试此命令flutter doctor --android-licenses

相关问题