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
shared_preferences
pubspec.yaml
For me , flutter doctor --android-licenses didn't work for some reason.
flutter doctor --android-licenses
The only cmd that worked & solved it all was this:
(your android_sdk folder exact path)\tools\bin\sdkmanager --licenses