简体   繁体   中英

Android emulator shows nothing but blank screen

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

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

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

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:

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).

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 (eg Lollipop Android 5.0.1 armeabi-v7a) in your AVD

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

or

http://www.bluestacks.com/

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

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.

在此处输入图片说明

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.

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

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.

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

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.

The AVD is just booting up. Wait a bit and you'll see a flashing android and after that it will show you the lock screen.

use the intel AVD if you want it to be a bit faster.

I had this problem with a emulator running Android with API Level 14. I solved it by reducing the memory, the emulator uses. At the beginning it was set to about 1 GB and when I set it to 256MB everything was fine.

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:

/extras/intel/Hardware_Accelerated_Execution_Manager/

I had the same problem on model with and processor, deleted the and created new .处理器的型号上遇到了同样的问题,删除了并创建了新的
While creating new in the advanced options -->hardware configurations set memory as and selected option.时 --> 硬件配置将内存设置为并选择选项。
On launching received the error with some package, was prompted for auto update of this package and worked for me with charm after that.收到一些包的错误,系统提示自动更新这个包,然后为我工作。

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

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.

Sounds like there are many possible solutions so here's how I solved my black emulator screen after something (Gradle?) updated in Android Studio:

Change the AVD's Graphics setting to "Software - GLES 2.0"

Link to my full answer of a related question with a screenshot: https://stackoverflow.com/a/48287265/6343114

Update: so far, this isn't working on Play Store-enabled devices, because the Graphics setting can't be changed

I had the Problem with black screen plus audio fail messages with a newly installed Android Studio 3.4.1 on a fairly new amd machine. so i installed arm based virtual devices, used the Nexus 4 API 15 on targed 4.0.3 (Google API) as recommended for a first start.

I changed windows settings -> privacy -> microphone-> let other apps use it to fix the failing audio messages.

for the black screen all the above suggestions didnt work for me, until i changed the settings on extended controls once the black screened virtual device comes up:

went to settings -> advanced and changed both "OpenGL ES renderer" and "OpenGL ES API level" to "Desktop native OpenGL" and "Compatibility" respectively.

a word of caution, the devices seem to be very fragile and get corrupted when changing stuff back and forth in avd manager, especially when changing system image.

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.

I just started with android development recently and I had the problem with emulator showing black screen even when I was using software GPU acceleration. On executing the following command in tools folder in Sdk folder of Android

 $./emulator -accel-check

The output which is given below showed that KVM was installed correctly and was usable.

    accel: 
    0
    KVM (version 12) is installed and usable.
    accel

So I installed the following packages

$ sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils ia32-libs-multiarch

As I use Manjaro I didn't find all the packages in software repo. I was able to find only the following packages

  1. qemu
  2. libvirt
  3. bridge-utils

Installing these helped me run AVD in both software and hardware GPU accleration.

Source: - https://developer.android.com/studio/run/emulator-acceleration.html

First Solution

Go to your source project file and remove these files and folders

 .gradle/
 .idea/
 .iml/
 build

Then close and reopen your project. After that try to build and run.

Second solution

Tools -> AVD Manager -> select your virtual device -> right click -> Wipe data

切换到软件加速,它应该修复它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM