Just Ras
Just Ras

Reputation: 73

How do I run my flutter program on the Android emulator ? Because when it runs the program can only run on Chrome

I installed the flutter and dart plugins on Android Studio, already installed SDK and AVD for the Android emulator. But the program still runs on chrome

Upvotes: 7

Views: 13852

Answers (3)

Elmar
Elmar

Reputation: 4387

To see available emulators run this command:

flutter emulators

Then copy the name of emulator from there and enter this command:

flutter emulators --launch EmulatorNameHere

Now when the emulator ready and running:

flutter run

Upvotes: 7

jaredbaszler
jaredbaszler

Reputation: 4809

If you are using VS Code, you can select the target device by using the status bar changer:

enter image description here

That will open up the list of connected devices in the command palette you can pick from.

enter image description here

Upvotes: 7

glavigno
glavigno

Reputation: 503

Launch your Android emulator, run flutter devices to get the id of the emulator device. Then, you can run flutter run -d [emulator_id] to launch the Flutter application on the targeted device.

Upvotes: 3

Related Questions