我使用的是Ubuntu 18.04LTS,Android Studio v3.0.1,安装了最新的Android SDK API30和29,Android SDK构建工具,平台工具和命令行工具(最新),降级到java jdk1.8,在VSCode上安装了Dart插件,在Android Studio上安装了Dart和flutter插件,在终端上安装了Flutter using snap。
但是当我运行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,但问题仍未解决。
发布于 2020-10-07 06:18:26
运行以下命令
$ export JAVA_HOME=`/usr/libexec/java_home -v 1.8*`
$ flutter doctor --android-licenseshttps://stackoverflow.com/questions/64234534
复制相似问题