Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recreate android folder in flutter project

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?

like image 430
Shanu Avatar asked Nov 25 '25 01:11

Shanu


2 Answers

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.

like image 82
lakscastro Avatar answered Nov 26 '25 15:11

lakscastro


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 .
like image 21
Durga Sriram Avatar answered Nov 26 '25 13:11

Durga Sriram