I deleted the android folder of my flutter project (Thought I could get rid of the errors that appear while running old projects).
How can I create that android folder? any commands?
Inside your project root, run:
flutter create . --platforms=android
This will (re) generate missing files or folders inside the android folder.
For all currently supported platforms:
flutter create . --platforms=android,windows,linux,web,macos,ios
Or simply:
flutter create .
To specify a package name, append:
flutter create . --platforms=android --org com.yourpackage.name
Flutter CLI reference.
The first command will recreate all folders like ios, android, windows, web, linux, and macos.
flutter create .
The second command will recreate android folder.
flutter create --platforms android .
The third command will recreate android and iOS folders.
flutter create --platforms android,ios .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With