Reputation: 655
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?
Upvotes: 17
Views: 21772
Reputation: 151
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 do
flutter create .
or if you want to add package name
flutter create . --platforms=android,windows,linux,web,macos,ios --org com.yourpackagename.name
Upvotes: 0
Reputation: 2364
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 .
Upvotes: 38
Reputation: 486
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 .
Upvotes: 19
Reputation: 89
Navigated to the root of my project and ran flutter create
Basically telling flutter to try and repair all the damaged and / or missing files in you project.
Upvotes: 0