[Flutter] 调用VS Code 自带模拟器(虚拟机), 不需要借助Genymotion
点击 No Devices => 显示Creates and Launches a new Android emulator(创建并启动一个新的安卓模拟器)
Tip: "如果点击No Devices没有弹出提示框,请升级VS Code"
点击Creates and Launches a new Android emulator 后报如下错:
原文: No suitable Android AVD system images are available. You may need to install these using sdkmanager, for example: sdkmanager "system-images;android-27;google_apis_playstore;x86"
翻译: 没有合适的Android AVD系统图像可用。您可能需要使用sdkmanager安装这些组件,例如:sdkmanager "system-images;android-27;google_apis_playstore;x86"
实际上是需要Android Studio创建虚拟设备而不是VS Code来创建
解决办法如下:
打开Android Studio,创建模拟器
上图显示代表创建完成, 这时候返回VS Code 重复最初的步骤,发现有由安卓创建的Nexus 6虚拟设备了
点击Nexus 6
搞定