Regarding GPU mode error in launching Android virtual device

大憨熊 提交于 2019-11-30 14:13:54

Go to Virtual device manager, click 'Show on Disk' in the menu of the Virtual device. Open the config.ini file and change the respective line to: hw.gpu.mode=guest Then save the config.ini and then run Virtual device again. It should work.

I had the same error and what worked for me was : Open AVD manager as in the screenshot in the question. Then click on Edit this AVD on the right. After the configuration window opens, there is a setting for Graphics in Emulated Performance. I set it to Auto which solved the error for me.

I got the same error. As a work-around I created another virtual device (AVD) with the same configuration and then used that device as my Emulator. That fixed it. Click on the "Create Virtual Device" button shown in the screenshot.

You can also try changing the configuration of the virtual device to find which one works best for your app.

A one-liner to disable GPU for all installed AVDs:

find  ~/.android/avd/ -name config.ini | while read f; do sed -ibak 's/hw.gpu.mode=.*/hw.gpu.mode=off/' "$f"; done
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!