文章目录
- 下载Genymotion
- 安装
- 连接Android Studio
- 启动虚拟机出现Unable to start the virtual device. VirtualBox cannot start the Virtual device
下载Genymotion
需要注册再下载
下载带有VirtualBox的版本
安装
打开安装程序,如果出现了Unable to start VirtualBox的错误,就去给出的网址下载VirtualBox最新的版本,然后安装VirtualBox,注意安装目录要和旧版本的一样,安装过程中如果有进程占有情况,根据提示打开任务管理器结束相关进程。
然后结束当前安装进程,重新安装Genymotion。如果还是显示Unable to start VirtualBox,检查一下是否还是有相关进程占有情况,不行的话只有重启了。
安装结束后选择一个模拟器安装
连接Android Studio
crtl+alt+s打开设置,找到plugins,在搜索栏搜索Genymotion插件
安装成功需要重启才能生效,此时不要重启
打开Genymotion的setting,把genymotion默认的SDK路径改成AS默认搜索的SDK路径
这时候再重新启动Android Studio
通过Genymotion打开一个模拟器(如果没有模拟器,请去Genymotion安装),然后点击start会出现根
源motion模拟器
在Android Studio里面也能检测到模拟器
启动虚拟机出现Unable to start the virtual device. VirtualBox cannot start the Virtual device
启动虚拟机的时候如果出现
Unable to start the virtual device. VirtualBox cannot start the Virtual device
先查看日志文件,方法:
- 右击Genymotion中安装好的虚拟设备
- 选择Generate logs
- 选择一个路径存储,一般在Genymotion/logs/下新建一个该虚拟机的文件夹,
如:E:\Genymotion\logs\custom-23 - 等全部打勾之后再关闭
如果想生成全部虚拟机的日志文件:
- 点击工具栏的help>Generate Logs
- 同样选择一个路径存储
- 全部完毕后关闭
检查最近一次的日志文件general-VBoxSVC.log.xx,如果出现如下的语句
USBPROXY Getting USB descriptor failed with error 31
是因为不能使用USB extension pack,是新版本的VirtualBox不能和Genymotion兼容的问题。所以先卸载当前版本的VirtualBox,再去VirtualBox官网下载一个旧版本的,注意路径如果和卸载版本不同的话,需要再Genymotion里面把SDK的路径改一下。然后再启动虚拟机,应该就好了。