1.在Android Studio中,点Run菜单,然后点Edit Configurations…
2.在Defaults/Android Application,设置Target Device to Show chooser dialog
3.选择Use same device for future launches.
另外一种方法添加工具栏按钮打开vs emulator
1.File>Settings>External Tools
3.在Create Tool Dialog,输入名称和描述,然后填写Program 和Parameters
Task | Pragram | Parameters |
Quick-launch a particular profile | C:Program Files (x86)Microsoft Emulator Manager1.0emulatorcmd.exe | /sku:Android launch /id:[id of profile you want to launch] |
Open emulator manager | C:Program Files (x86)Microsoft Emulator Manager1.0emulatormgr.exe | /sku:Android |
如何获取设备Id?可以通过运行 emulatorcmd.exe /sku:Android list /type:device
4.在Android Studio 工具栏点右键选择Customize Menus and Toolbars…
如果在调试的时候没有出现运行的模拟器,那么你可以这样修改:
打开注册表,在HKEY_LOCAL_MACHINESOFTWAREWow6432NodeAndroid SDK Tools下
修改Path键值为你自己的Android SDK路径。