how to run flutter app in VSCode without android studio emulator

984

Solution 1

The first option is You can run your application on chrome or edge if you don't want to download an emulator. Follow the following steps:

  1. Click on the no-device option to select the device.
  2. Now select chrome or edge

And the second option is you can connect your mobile with your PC and use your phone to run the flutter apps. Follow the following steps: For Android:

  1. Enable developer options and USB Debugging on your device. This varies slightly by android version. But the short version is you tap on the device build number 7 times.

  2. Then a “Developer Options” option comes up. After that, you can click “enable USB Debugging.”

  3. Then plug your phone into your computer with a USB cable. You’ll see some popup on your phone asking if you want to allow USB debugging with that computer. Click on “yes”.

  4. Run Flutter just like you would if you had a simulator running.

Solution 2

If you have Gradle properly installed globally (https://gradle.org/install/) and the Android SDK setup on your machine, then you should not need the IDE.

Try first checking for available devices:

flutter devices

Then using the device that you find (if there are any spaces in the name that represents the device then use "" to format the command), execute the following command:

flutter run -d "Device Name With Spaces" --release 

Or:

flutter run -d DeviceNameWithoutSpaces --release
Share:
984
LPLN
Author by

LPLN

Updated on December 24, 2022

Comments

  • LPLN
    LPLN over 1 year

    I want to run flutter app in VS.Code without android studio emulator. I want run my app without install android studio. How can I do this?