即使使用Java8也会出现颤振医生问题
我使用的是Ubuntu18.04LTS,Android Studio v3.0.1,安装了最新的Android SDK API 30和29,Android SDK构建工具,平台工具和命令行工具(最新),降级为java jdk1.8,在VSCode上安装了Dart插件,在Android Studio上安装了Dart和FLATT插件,在snap-on终端上安装了FLATT 但是当我运行即使使用Java8也会出现颤振医生问题,java,android,flutter,sdk,Java,Android,Flutter,Sdk,我使用的是Ubuntu18.04LTS,Android Studio v3.0.1,安装了最新的Android SDK API 30和29,Android SDK构建工具,平台工具和命令行工具(最新),降级为java jdk1.8,在VSCode上安装了Dart插件,在Android Studio上安装了Dart和FLATT插件,在snap-on终端上安装了FLATT 但是当我运行flatter-doctor时,我得到了这个 Doctor summary (to see all details,
flatter-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之后,插件仍然没有安装
当我运行flatter-doctor--android许可证时,我通过在终端中键入Y
获得所有许可证并接受它们,即使在这之后,当我运行flatter-doctor
时,它仍然会给我相同的结果
Java 9存在问题,因此将JDK降级为1.8,但问题仍未解决。运行以下命令
$ export JAVA_HOME=`/usr/libexec/java_home -v 1.8*`
$ flutter doctor --android-licenses
当我运行第二个cmd时,我得到错误:JAVA_HOME设置为无效目录:/my user/libexec/JAVA_HOME-v 1.8*请在您的环境中设置JAVA_HOME变量以匹配JAVA安装的位置
因此,找到java安装目录,并使用正确的路径重新运行第一个命令,通常为/usr/lib/jvm/java-8-openjdk-amd64
使用本教程安装java,如果在$flatter config
命令中正确配置android studio目录,并且对sdk也正确配置,则可以同时执行和flatter doctor
输出samecheck