【Flutter】flutter doctor 报错Android license status unknown. Run `flutter doctor --android-licenses‘

Flutter

📝【Flutter】Learning to develop a mind, 【Necessary knowledge for programmers】

📔 Today’s little knowledge——flutter doctorreport an errorAndroid license status unknown. Run'flutter doctor --android-licenses'to accept the SDK licensesSolution!

[Flutter] Apple Mac computer configuration flutter development environment

[Flutter] Android Studio installs a third-party emulator - NetEase MuMu

1. Problem description

we are done configuringflutterAfter setting the environment, you need to check the relevant environment of the configuration, useflutter doctorOrder.
Under normal circumstances, if there is no error, it will be as shown in the figure below. If there is no error, the front is checked ✅.

There is no problem in checking the flutter environment configuration. This is the case

If any of them are not checked ✅ in front, it means that there is a problem, and you need to install the corresponding tools.

But recently some people have encountered such a problem, and I have encountered it myself, that isAndroid license status unknown. Run'flutter doctor --android-licenses'to accept the SDK licenses.

question prompt

meaning is:

Android Toolchain - Developed for Android Devices (Android SDK Version 30.0.3) ✗ Android license status unknown. runflutter doctor --android-licensesto accept the SDK license. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

According to the prompt isAndroidLicense status is unknown, let's runflutter doctor --android-licensesto solve.

I followed the prompts and found that it still did not solve the problem, so I went toAndroid StudioTo investigate the problem, after a long time, finally solved the problem! It is caused by the lack of Android libraries.

2. Problem solving

  1. OpenAndroid Studio

  2. turn upPreferences

findPreferences

  1. then findSystem SettingsinsideAndroid SDK

  2. Finally inSDK ToolsselectAndroid SDK Command-line Tools, select, click at the bottom“Apply”to install.

Location as shown below:

Operating procedures

ApplyAfter the installation is successful, run it again in the terminalflutter doctorCommand to check, this time the error will be different. (There are no screenshots here, because I have solved it without reporting any errors 😁)

execute againflutter doctor --android-licenses, will let you agree to some agreement, alwaysYJust agree.

Just keep pressing agree

Finally run againflutter doctorThe command check will no longer report an error, indicating that the problem has been successfully solved.

Run the command check and no longer report an error

3. Write at the back

Follow me, more content will continue to be output

🌹 If you like it, give it a like👍🌹

🌹 If you think you have something to gain, you can come to a wave of favorites + follow, so as not to find me next time😁🌹

🌹Welcome everyone to leave a message to exchange, criticize and correct,ForwardPlease indicate the source, thank you for your support! 🌹

Tags: 【Flutter】flutter doctor 报错Android license status unknown. Run `flutter doctor --android-licenses‘

Flutter android flutter ios

Related: 【Flutter】flutter doctor 报错Android license status unknown. Run `flutter doctor --android-licenses‘