配置:cpu i9700k
在ubuntu1804中单独运行 Android studio的模拟器 或者 VirtualBox的虚拟机 是可以正常启动的。
先启动VirtualBox的虚拟机
在ubuntu1804中,打开 模拟器时出现了问题,如下:
AVD Pixel_4_API_28 is already running. If that is not the case, delete the files at /home/gs/.android/avd/Pixel_4_API_28.avd/*.lock and try again.
截图:
刚开始不知道,以为是模拟器的原因,然后重新安装了,还是不行。。。。。。
先启动 Android studio的模拟器
在启动VirtualBox的虚拟机,出现如下图错误:
查看日志,如下:
00:00:03.910450 GUI: UIMachineViewNormal::resendSizeHint: Restoring guest size-hint for screen 0 to 438x54
00:00:03.910529 ERROR [COM]: aRC=E_ACCESSDENIED (0x80070005) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={The console is not powered up}, preserve=false aResultDetail=0
00:00:03.910699 GUI: Aborting startup due to invalid machine state detected: 1
查看官网
网址:https://developer.android.com/studio/run/emulator-acceleration?hl=zh-cn#hypervisors
如下面的图片:
解决办法
我使用VirtualBox虚拟机,主要目的就是为了用source insight看Android源代码,但是,现在这种方法实现不了,
换个思路,使用wine的办法,在ubuntu中安装source insight,需要注意的是,ubuntu + wine 环境下,不能安装4.0版本的,要安装3.5版本的source insight。
总结
(1)白白浪费了一天的时间,真艹蛋。
(2)我是经过前前后后不断的重装VirtualBox虚拟机(刚开始以为是虚拟机哪里配置不对)才发现的。
(3)以后在面对这样的问题,先多思考可能的原因,不能想当然蛮干,时间都浪费了。