运行flutter doctor 提示错误 Android license status unknown.

运行flutter doctor 提示错误

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

1、设置 Android Studio

检查是否勾选了 Android SDK Tools(Obsolete)

运行flutter doctor 提示错误 Android license status unknown._第1张图片

2、java jdk 版本改为 1.8

根据自己的java jdk 8 路径更改环境变量

C:\Program Files\Java\jdk1.8.0_291\bin

3、打开命令行运行 flutter doctor

提示变成下面的样子

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    X Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

然后运行 flutter doctor --android-licenses 一路 输入y 完成

在输入 flutter  doctor 查看是否显示正确。

如果还提示错误

安装 Android SDK command-linn tootls

 

运行flutter doctor 提示错误 Android license status unknown._第2张图片

你可能感兴趣的:(android,studio,flutter)