Flutter Android Studio
Solved Failed to install the following android SDK packages as some licenses have not been accepted
You just started using flutter with android studio and you get the error Failed to install the following Android SDK packages as some licenses have not been accepted.
More than likely you are first running the test flutter_app on windows to make sure everything is working so you can start developing your android app with flutter.
Don’t worry I have the quickest solution for you! Follow me…
Okay, this is really simple.
First, open a command prompt.
Click Start, then type cmd.
We need to change the directory to the Flutter\bin directory.
The Suggested setup is C:\src\flutter\flutter\bin
Change the directory to where you installed your flutter installation
use “cd C:\src\flutter\flutter\bin”
Now, we just need to run the flutter doctor.
“flutter doctor -h” so you can see all the commands here.
flutter doctor will help you get everything installed correctly but all we need to do is run the command to solve the issue:
“flutter doctor –android-licenses”
This runs the android SDK manager tool to accept the SDK licenses.
Yours will ask you to accept the licenses.
Press “y” enter as many times as you need.
Now run “flutter doctor” and you should have all the checkmarks.
That should solve your issue with failure to install the following android SDK packages and some licenses have not been accepted.
Make sure you run your test flutter app to make sure everything is working properly.