How to set up devices for VS Code for a Flutter emulator

前端 未结 16 737
南笙
南笙 2020-12-23 14:42

I\'d like to use VS Code as my editor for Flutter development, but I don\'t know how to get the emulator going. I\'ve installed VS Code on Ubuntu 17.10.

I followed th

相关标签:
16条回答
  • 2020-12-23 14:52

    First, You have to install the Android Studio and Xcode to create phone emulator.

    In VSCode you can use the Android IOS Emulator plugin to set the path of emulator to run.

    0 讨论(0)
  • 2020-12-23 14:53

    you can use 'Android iOS Emulator' plugin and Add the Android Studio emulator script to your settings in Visual Studio Code:

    Mac: emulator.emulatorPath": "~/Library/Android/sdk/tools/emulator

    Windows: emulator.emulatorPath": "<your android home>\\Sdk\\emulator\\emulator.exe

    Linux: emulator.emulatorPath": "~/Documents/SDK/tools

    Your visual studio code settings are found here: File -> Preferences -> Setting -> User Setting -> Extensions -> Emulator Configuration. Open command pallete Cmd-Shift-P -> Type Emulator

    0 讨论(0)
  • 2020-12-23 14:53

    The following steps were done:

    1. installed genymotion
    2. configured a device and ran it
    3. in the vscode lower right corner the device shows
    0 讨论(0)
  • 2020-12-23 14:56

    You can connect an Android Phone via USB cable and then it will show the device in the bottom bar.(Please note ADB must be installed. Click here for more)

    Or you can completely install Android Studio and setup emulator from there and run the emulator. Then VS Code will recogzine the emulator and show at the bottom bar.

    0 讨论(0)
  • 2020-12-23 14:58

    To select a device you must first start both, android studio and your virtual device. Then visual studio code will display that virtual device as an option.

    0 讨论(0)
  • 2020-12-23 15:00

    Alternatively if you enable developer mode and (ADB) is still needed you can use connect to the device.

    To enable developer Mode you go to Phone Settings > About Phone > tap buildnumber 7 times

    once you have it enabled and have the device connected you can start seeing the device in VSCode

    0 讨论(0)
提交回复
热议问题