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
2.Click Add
3.在Create Tool Dialog,输入名称和描述,然后填写Program 和Parameters
Task | Pragram | Parameters |
Quick-launch a particular profile | C:\Program Files (x86)\Microsoft Emulator Manager\1.0\emulatorcmd.exe | /sku:Android launch /id:[id of profile you want to launch] |
Open emulator manager | C:\Program Files (x86)\Microsoft Emulator Manager\1.0\emulatormgr.exe | /sku:Android |
如何获取设备Id?可以通过运行 emulatorcmd.exe /sku:Android list /type:device
4.在Android Studio 工具栏点右键选择Customize Menus and Toolbars…
如果在调试的时候没有出现运行的模拟器,那么你可以这样修改:
打开注册表,在HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools下
修改Path键值为你自己的Android SDK路径。
https://msdn.microsoft.com/en-us/library/mt228282.aspx#ADB
时间: 2024-11-08 10:06:28