Android Studio创建Genymotion模拟器失败解决办法 win10

本文介绍了在Windows 10系统中,使用Android Studio配置Genymotion模拟器时遇到的启动失败问题及解决方法。通过查看Genymotion的日志文件,发现虚拟机内存设置为4M,将内存调整到512M后,成功启动模拟器。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

虽然Android Studio自带的模拟器已经比较方便快捷了,但是跟真机比起来,速度还是差的太远。所以,我尝试加入了Genymotion模拟器。添加Genymotion模拟器的教程这里就不提供了,直接搜索就可以搜到一大堆结果。这里只说一下我遇到的一个问题。

配置好以后,打开Genymotion模拟器,选择新建模拟器,然后start。结果在启动过程中报错,具体错误什么都没写,只是给了个链接,然后让进去查找,链接地址:

https://www.genymotion.com/#!/support?chapter=collapse-logs#faq

比较方便的是,它一般会定位到相关错误的位置,我这里定位到的位置是这里,如下图:

然后,我就去相应的位置下找logcat文件,我的系统是win10,地址是:

C:\Users\***(计算机名称)\AppData\Local\Genymobile\Genymotion\deployed\PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920(模拟器名称)\genymotion-player.log

大家可能注意到一点,就是我的log文件的名字并不是提示中所说的 logcat.txt,我试过另外一个确实是提示中的名字,所以如果遇到这个文件,也是一个log,暂时没有发现共存的情况。

打开log文件,里面的log提示如下:

[Genymotion Player] [Debug] [Adb] adb found at "F:\wenqiang\android studio\sdk\platform-tools\adb.exe" 
[Genymotion Player] [Debug] Virtual device configured 
[Genymotion Player] [Debug] Invalid local token, authenticating. 
[Genymotion Player] [Debug] [login] Trying to authenticate  "wenqiang0718@163.com" 
[Genymotion Player] [Debug] Trying to logout user 
[Genymotion Player] [Debug] Virtualization engine configured 
[Genymotion Player] [Debug] [doRequest] Requesting:  "https://cloud.genymotion.com/launchpad/login/" 
[Genymotion Player] [Debug] VBoxManage ("showvminfo", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920") returns 0 
[Genymotion Player] [Debug] Virtual Machine status: off 
[Genymotion Player] [Debug] Start the device... 
[Genymotion Player] [Debug] VBoxManage ("guestproperty", "set", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", "androvm_ip_management") returns 0 
[Genymotion Player] [Debug] VBoxManage ("modifyvm", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", "--nic1", "hostonly") returns 0 
[Genymotion Player] [Debug] VBoxManage ("modifyvm", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", "--hostonlyadapter1", "VirtualBox Host-Only Ethernet Adapter #3") returns 0 
[Genymotion Player] [Debug] VBoxManage ("modifyvm", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", "--nictype1", "virtio") returns 0 
[Genymotion Player] [Debug] VBoxManage ("modifyvm", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", "--cableconnected1", "on") returns 0 
[Genymotion Player] [Debug] VBoxManage ("guestproperty", "set", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", "genymotion_vm_name", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920") returns 0 
[Genymotion Player] [Debug] VBoxManage ("showvminfo", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920") returns 0 
[Genymotion Player] [Debug] [doRequest] done 
[Genymotion Player] [Debug] [login] Login process result: 1 
[Genymotion Player] [Debug] [login] User authenticated: "wenqiang0718@163.com" 
[Genymotion Player] [Debug] Activation: Server returned an error when trying to activate Genymotion. Error code = 2 
[Genymotion Player] [Error] VBoxManage ("startvm", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", "--type", "headless") returns 1 
[Genymotion Player] [Error] Unable to start virtual device: "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920" 
[Genymotion Player] [Error] Try to launch virtual device from VirtualBox to check the issue. 
[Genymotion Player] [Error] Unable to start virtual device 
[Genymotion Player] [Debug] [PlayerApp] Instance cleaned 
[Genymotion Player] [Error] ****  EXIT WITH ERROR  **** 
[Genymotion Player] [Debug] VBoxManage ("guestproperty", "get", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920", "androvm_ip_management") returns 0 
[Genymotion Player] [Debug] VBoxManage ("showvminfo", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920") returns 0 
[Genymotion Player] [Debug] VBoxManage ("showvminfo", "PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920") returns 0 
[Genymotion Player] [Warning] ****   STOPPING VIRTUAL DEVICE   **** 
[Genymotion Player] [Debug] Exit status: 14 
百度了一下,完全么有卵用。那就再看一下提示,看到一下这句话:

Try to launch virtual device from VirtualBox to check the issue.

打开Oracle VM VirtualBox,然后找到相应虚拟机,设置,看各项设置。

发现一个问题,那就是系统中使用内存为4M,想到昨天遇到一个问题就是新建Android Studio自带模拟器时需要将内存重新分配,于是尝试修改到512M,如下:

保存,关闭VirtualBox,然后启动Genymotion相应模拟器,结果OK。

于是我猜测win10中是否新建虚拟机会自动分配系统内存为最小值,没有验证,所以大家有兴趣可以验证一下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值