Deleting the android folder and running this command worked for me.
flutter create --platforms android .