前言: 用Android studio自带的模拟器又卡又重启,又不大想用自己的手机做调试,看知乎推荐一款叫做Genymotion的模拟器听说很好用,来试下水。
1.下载
点击上面的下载链接,然后以个人身份注册,邮箱认证,然后就可以点击下载了。
2. 安装
打开命令行 切换到当前这个文件的路径下执行
sudo chmod u+x genymotion-xxx_x64.bin
sudo ./genymotion-xxx_x64.bin
就可以安装了
看上面安装提示说已经安装好了,我们可以到/opt/genymobile/genymotion里用genymotion等三个工具。
执行./genymotion
提示缺少virtualbox
百度了下可以用命令行安装的,我用aptitude search发现本机已经包含对应的包,直接apt-get install起来
sudo apt-get update
sudo apt-get install virtualbox
然后再启动发现还是启动不了,virtualbox有个部分安装失败了。
https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1572985
后来没办法还是按照genymotion推荐的方法来下载对应Ubuntu的deb包就好。
最后再启动就可以了。
3. 使用
第一步登录账号,不然模拟器下载列表里啥东西都没有
第二步创建模拟器和Android studio一样的
第三步启动就好了
我第一次启动死机了,我再来试一下。。。还是死机了,晕。。。。
百度了下也没啥对的上的解决方法,我今天下午在干嘛。。。是游戏不好玩还是b站不好看。。。
报错log:
jiatai@jiatai:/$ cat /home/jiatai/.Genymobile/genymotion.log | grep error VBoxManage: error: Failed to create the host-only adapter VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 71 of file VBoxManageHostonly.cpp" VBoxManage: error: Failed to create the host-only adapter VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 71 of file VBoxManageHostonly.cpp"休息一下,下周再战。