Android 模拟器只显示空白屏幕

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23509626/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 07:13:04  来源:igfitidea点击:

Android emulator shows nothing but blank screen

androidavd

提问by user1552698

I am a complete nOOb to Android programming and trying my hands at it for the first time by going through the tutorials. The problem is that I have created multiple emulators using android 4.4.2 API and none of them show anything but blank screen..I tried an AVD with Google API 19..thats not working either..Can anyone please guide me figuring out what's wrong with it..Thanks in advance

我是 Android 编程的完全新手,并通过阅读教程第一次尝试使用它。问题是我已经使用 android 4.4.2 API 创建了多个模拟器,但除了空白屏幕之外,它们都没有显示任何内容。错了..提前致谢

回答by Daniele B

I had the same problem, running on a Mac Book Pro bought in 2011.

我遇到了同样的问题,在 2011 年购买的 Mac Book Pro 上运行。

I solved it by selecting "Use Host GPU" as the emulation option at the bottom of the "Create..." screen.

我通过选择“使用主机 GPU”作为“创建...”屏幕底部的仿真选项来解决它。

回答by JeffB6688

Mac Users: Unfortunately, if you have an older Mac (late 2009 for example) and are using Yosemite, you cannot use HAXM for 64 bit architecture. According to the release notes on HAXM:

Mac 用户:不幸的是,如果您有一台较旧的 Mac(例如 2009 年末)并且正在使用 Yosemite,则不能将 HAXM 用于 64 位架构。根据 HAXM 的发行说明:

HAXM driver does not support emulating a 64 bit system image on Intel systems based on Core microarchitecture (Core, Core2 Duo etc.). All systems based on Nehalem and beyond are supported. (Corei3, Core i5 and Core i7 machines).

HAXM 驱动程序不支持在基于 Core 微架构(Core、Core2 Duo 等)的 Intel 系统上模拟 64 位系统映像。支持所有基于 Nehalem 及更高版本的系统。(Corei3、Core i5 和 Core i7 机器)。

I spent a day trying to figure this problem out when I came upon this quote. The only thing that works is to use the non-x86 version of the latest OS (e.g. Lollipop Android 5.0.1 armeabi-v7a) in your AVD

当我看到这句话时,我花了一天的时间试图解决这个问题。唯一有效的是在您的 AVD 中使用非 x86 版本的最新操作系统(例如 Lollipop Android 5.0.1 armeabi-v7a)

回答by AmirHossein Parsapour

I had the same problem in win10 64bit, too. After a lot of searching, I found this solution.(If you're using an intel system(CPU, GPU, Motherboard, etc.)) Hope it work for you, too.

我在win10 64位也有同样的问题。经过大量搜索,我找到了这个解决方案。(如果您使用的是英特尔系统(CPU、GPU、主板等))希望它也适用于您。

step 1: Make sure virtualization is enabled on your device:

步骤 1:确保在您的设备上启用了虚拟化:

Reboot your computer and then press F2 for BIOS setup. You should find Virtualization tag and make sure it is marked as enabled. If it's not enabled, no virtual devices can run on your device.

重新启动计算机,然后按 F2 进行 BIOS 设置。您应该找到 Virtualization 标签并确保将其标记为已启用。如果未启用,则无法在您的设备上运行任何虚拟设备。

step 2: Install/Update Intel Hardware Accelerated Execution Manager(Intel HAXM) on your device:

第 2 步:在您的设备上安装/更新英特尔硬件加速执行管理器(英特尔 HAXM):

This software should be installed or updated for any AVDs to run. You can download the latest version by googling "HAXM". After download, install .exe file and reboot your computer.

应安装或更新此软件以运行任何 AVD。您可以通过谷歌搜索“HAXM”下载最新版本。下载后,安装 .exe 文件并重新启动计算机。

回答by Krunal Kapadiya

I have recently the same issue in emulator, Nexus 5 (Android O). I have go to Android Virtual Device Manager and Wipe User Data and it solved my Problem.

我最近在模拟器 Nexus 5 (Android O) 中遇到了同样的问题。我已经转到 Android 虚拟设备管理器并擦除用户数据,它解决了我的问题。

enter image description here

在此处输入图片说明

回答by Simpalm

Android emulator response time is very slow so you can try some alternative like https://cloud.genymotion.com/page/launchpad/download/

Android 模拟器响应时间非常慢,因此您可以尝试一些替代方法,例如 https://cloud.genymotion.com/page/launchpad/download/

or

或者

http://www.bluestacks.com/

http://www.bluestacks.com/

both are very good option for testing application on development phase.

两者都是在开发阶段测试应用程序的非常好的选择。

回答by Pellet

I managed to fix this problem by manually re-installing HAXM. I think Android Studio screwed the install up. You can run the installer(.DMG) from this directory inside your Android SDK directory:

我通过手动重新安装 HAXM 设法解决了这个问题。我认为 Android Studio 把安装搞砸了。您可以从 Android SDK 目录中的此目录运行安装程序 (.DMG):

/extras/intel/Hardware_Accelerated_Execution_Manager/

回答by abhi

I had the same problem on Macbook pro mid 2012model with 4 GB RAMand intel core i5processor, deleted the AVDand created new AVD.
While creating new AVDin the advanced options -->hardware configurations set memory as 512 MBand selected Use Host GPUoption.
On launching AVDreceived the error with some package, was prompted for auto update of this package and worked for me with charm after that.

我在配备4 GB RAM英特尔酷睿 i5处理器的Macbook pro 2012 年中型号上遇到了同样的问题,删除了AVD并创建了新的AVD。在高级选项中创建新AVD时 --> 硬件配置将内存设置为512 MB并选择使用主机 GPU选项。 在启动AVD 时收到一些包的错误,系统提示自动更新这个包,然后为我工作。

回答by Keyur Sanghvi

I think your problem is that your application emulator doesn't start because of your RAM storage, maybe you need to create a device with very low resolution.

我认为您的问题是您的应用程序模拟器由于 RAM 存储而无法启动,也许您需要创建一个分辨率非常低的设备。

回答by JRun

Tried all of the above. What eventually worked, was a combination of using software based graphics rendering, in combination of 'older' device images (nexus 7 works, nexus 10 doesn't). Go figure. And yeah, it's very slow.

上面的都试过了。最终奏效的是结合使用基于软件的图形渲染,结合“旧”设备图像(nexus 7 有效,nexus 10 无效)。去搞清楚。是的,它非常慢。

回答by Thatguywhohadthisproblem

If you got it to run the first time after installation but couldn't get it to run again it might be because you have virtualization disabled. Go into your BIOS and enable it. This is also on the FAQS of andyroid on installation.

如果您在安装后第一次运行它但无法再次运行它,则可能是因为您禁用了虚拟化。进入您的 BIOS 并启用它。这也在andyroid安装常见问题解答中。