【Flutter】flutter doctor 报错Android license status unknown. Run `flutter doctor --android-licenses‘
📝【Flutter】Learning to develop a mind, 【Necessary knowledge for programmers】
📔 Today’s little knowledge——
flutter doctorreport an error
Android license status unknown. Run'flutter doctor --android-licenses'to accept the SDK licensesSolution!
we are done configuring
flutterAfter setting the environment, you need to check the relevant environment of the configuration, use
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 ✅.
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 is
Android license status unknown. Run'flutter doctor --android-licenses'to accept the SDK licenses.
Android Toolchain - Developed for Android Devices (Android SDK Version 30.0.3) ✗ Android license status unknown. run
flutter 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 is
AndroidLicense status is unknown, let's run
flutter doctor --android-licensesto solve.
I followed the prompts and found that it still did not solve the problem, so I went to
Android StudioTo investigate the problem, after a long time, finally solved the problem! It is caused by the lack of Android libraries.
Android SDK Command-line Tools, select, click at the bottom
Location as shown below:
ApplyAfter the installation is successful, run it again in the terminal
flutter doctorCommand to check, this time the error will be different. (There are no screenshots here, because I have solved it without reporting any errors 😁)
flutter doctor --android-licenses, will let you agree to some agreement, always
Finally run again
flutter doctorThe command check will no longer report an error, indicating that the problem has been successfully solved.
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! 🌹