【发布时间】:2021-01-21 20:22:11
【问题描述】:
我使用的是 Ubuntu 18.04LTS,Android Studio v3.0.1,安装了最新的 Android SDK API 30 和 29,Android SDK 构建工具、平台工具和命令行工具(最新),降级到 java jdk1.8,已安装在 VSCode 上安装 Dart 插件,在 Android Studio 上安装 Dart 和 Flutter 插件,在终端上使用 snap 安装 Flutter。
但是当我运行flutter doctor 时,我明白了
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.0, on Linux, locale en_IN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Android Studio (version 3.0)
[!] Android Studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.44.0)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
它说插件没有安装,即使我安装了它并重新启动了android studio。
当我运行flutter doctor --android-licenses 时,我通过在终端中输入Y 获得所有许可证并接受它们,即使在此之后当我运行flutter doctor 它仍然给我相同的结果。
Java 9 出现问题,因此将 JDK 降级到 1.8,但问题仍未解决。
【问题讨论】: