I\'m developing android and ios app with Google flutter.
when I add a new dependency like shared_preferences
to pubspec.yaml
and then execute
For newer installations (especially on MacOS) flutter doctor --android-licenses
does not work. Run the following command (notice the new path to sdk cmdline tools) and you will able to accept the licenses:
~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager --licenses
I think is a little late to answer this question, but I think this can be useful for those who are starting in Flutter like me.
In my case (at my machine), I've executed the steps below:
Before run given command please make sure that you have done with environment variable setup on windows/mac/i/Linux/Unix for
Note:- update variable path with your sys path for example
flutter doctor --android-licenses
y
to accept every license.;flutter doctor -v
to check if the issue was solved;For me , flutter doctor --android-licenses
didn't work for some reason.
The only cmd that worked & solved it all was this:
(your android_sdk folder exact path)\tools\bin\sdkmanager --licenses
I had java SE 11
installed and its variables set up.
It somehow interfered with flutter!
Double-check your java path entry. Go to your java environment variables and double-check your path entry. Keep one of them in the bin and remove the other.
Mine:
C:\Program Files\Java\jdk-11.0.8\bin
C:\Program Files\Java\jdk-11.0.8
In the command line just run flutter doctor --android-licenses
accept everything (by clicking y key followed by enter key).
If you are in windows open command prompt as admin and run the following command.
flutter doctor --android-licenses
Then enter y
for all (y/n) to accept agreement.
Installing Android SDK Tools (Obsolete) 26.1.1 worked for me. I found this at another link. I will try to find and pasted here. Remember to un-select show obsolete so you can find the SDK.
After this, I was able to do Flutter doctor Android Licenses and select y.