构建后如何运行 Android 模拟器? [英] How do I run the Android Emulator after a Build?

查看:23
本文介绍了构建后如何运行 Android 模拟器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我已经成功下载了源代码,构建成功,并且可以成功运行模拟器.但是,它永远不会启动到实际映像中.相反,我查看了终端,它给了我以下错误.

So I have download the source code successfully, built it successfully, and can run the emulator successfully. However it never boots into the actual image. Instead I look at the terminal and it gives me the following error.

OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x2deae10
OpenGL Warning: Retry with 0x105 returned 1 visuals
Failed to create Context 0x3005
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
destroyOpenGLSubwindow not implemented for separate renderer process !!!
createOpenGLSubwindow not implemented for separate renderer process !!!
repaintOpenGLDisplay not implemented for separate renderer process !!!
createOpenGLSubwindow not implemented for separate renderer process !!!
repaintOpenGLDisplay not implemented for separate renderer process !!!

我在 Virtual Box 中运行 Ubuntu 10.04.启用 3D 加速并且至少 16GB 的内存专用于盒子.

I am running Ubuntu 10.04, inside of Virtual Box. With 3D Acceleration enabled and at least 16GB of ram dedicated to the box.

基本上模拟器只是在那里停留一段时间,然后在模拟器窗口周围绘制一个红色矩形.

Basically the emulator just sits there for a good while and then draws a red rectangle around the emulator window.

推荐答案

来自 使用安卓模拟器|配置虚拟机加速:

不在 VM 内 - 您不能在另一个虚拟机(例如 VirtualBox 或 VMWare 托管的虚拟机)内运行 VM 加速模拟器.您必须直接在系统硬件上运行模拟器.

Not Inside a VM - You cannot run a VM-accelerated emulator inside another virtual machine, such as a VirtualBox or VMWare-hosted virtual machine. You must run the emulator directly on your system hardware.

所以禁用 3D 加速,它应该可以工作.

So disable 3D acceleration and it should work.

另一种可能的选择:设置端口转发.您应该能够在主机系统上运行 Android VM 并设置监听其 adb 服务器实例以监听 TCP 连接请求.在 Ubuntu 实例中,告诉 adb 连接到特定地址.您需要以某种方式设置从它到其主机的转发.如果可行,您可以使用加速的 Android 虚拟机实例.

Another possible option: setup port forwarding. You should be able to run the Android VM on the host system and setup listening of its adb server instance to listen to TCP connection requests. Inside the Ubuntu instance, tell adb to connect to a specific address. You'd need to setup a forwarding from it to its host somehow. If this works, you could use an accelerated Android VM instance.

这篇关于构建后如何运行 Android 模拟器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆