To fix this you just need to run the following command and accept all Android licenses:
flutter doctor --android-licenses