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
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).