0

I am a newbie to android development and am running Ubuntu Linux with an AMD cpu. I installed Android Studio, JDK, SDK, etc, and have been trying to run the emulator. However, whenever I try launching the emulator, it stays a black screen. The message I repeatedly get in terminal is

WARN - run.EmulatorConnectionListener - Emulator not ready yet, dev.bootcomplete = null

I have tried waiting for a while, I have tried updating it, I have tried different APIs, I have tried setting emulated performance to software, and everything else I could find online. Help would be greatly appreciated!

Specs: Ubuntu 16.04 LTS Android Studio 2.3.3 Radeon R9 270x 4gb AMD FX4100 32g ram SVM is enabled in BIOS

Josh
  • 1
  • 1
  • 2
  • 1
    Which emulator are you trying to run (Android version, screen size, etc.)? How long did you wait? – Morrison Chang Jul 12 '17 at 00:11
  • I tried quite a few different emulators and even created my own profile with android 8.0, 6.0, 5.1, and 5.0. I waited about 15 minutes with nothing changing. From what I've read, it shouldn't take that long. Do you think I just need to wait longer? – Josh Jul 12 '17 at 00:45
  • From a fresh emulator image, wait longer, also reduce the size of the screen to something like 800x480. You should be able to monitor the logcat after a bit and as long as its moving along -wait. My long ago answer to this: https://stackoverflow.com/questions/3692363/android-avd-not-showing-anything-only-android-in-the-middle-of-the-screen/3693851#3693851 – Morrison Chang Jul 12 '17 at 00:59
  • Okay, so it says "read: unexpected EOF! " and then stops and just sits there. EDIT: I also ran a different one and it said E gralloc : invalid gralloc handle (at 0x0) – Josh Jul 12 '17 at 01:57
  • Hmm. Update your question with more details on the emulator image (screen size, memory allocation, android API version, GPU on/off) you are trying to run. List out what kind of hard drive you have as well as free space on the hard drive. I assume you are trying to run the `armeabi-v7a` image. Additionally you may want to look at Genymotion as your emulator. See: https://stackoverflow.com/questions/31366453/run-android-studio-emulator-on-amd-processor – Morrison Chang Jul 12 '17 at 02:10
  • I tried both x86 and armeabi-v7a and neither worked. With armeabi, it just says "waiting for target device" and then times out. With x86, I get a black screen and it just sits and waits. I have tried with 1440p, 1080p, and 400x800. I am pretty sure I tried increasing memory allocation but where is that setting located again (just to make sure I'm actually doing it right)? I have tried APIs 26, 25, 24, 22, and 21. Do you mean physically removing the GPU for GPU on/off? Also, I have a seagate 1tb hard drive with like 900gb free. – Josh Jul 12 '17 at 06:30
  • x86 should not work as it is for HAXM which is Intel only. Sorry GPU on/off is a old emulator configuration setting, on the last screen of https://developer.android.com/studio/run/managing-avds.html#createavd its called Emulated Performance Graphics - set it to Software (wondering if the video driver is the problem). If you want to provide Google a bug report follow the instructions here: https://developer.android.com/studio/report-bugs.html#emulator-bugs – Morrison Chang Jul 12 '17 at 16:18
  • So I fixed it. I reinstalled everything, I made a virtual device with a small screen size and low res, then I right clicked it and clicked show on disk. After, I went into config.ini and changed hw.gpu.mode=mesa to hw.gpu.mode=guest. – Josh Jul 12 '17 at 20:37
  • Great that you were able to resolve it. Post a detailed response as an answer and I'll upvote. – Morrison Chang Jul 12 '17 at 22:26
  • Mine was already set to hw.gpu.mode=guest. Still have the issue of a blank emulator. – Martin Naughton Aug 04 '17 at 14:53

1 Answers1

0

This happened to me recently (emulator with black screen, with all AVDs, even those which worked previously), maybe after some system or Android SDK updates.

How I fixed it:

  • delete whole .android directory (is in your home directory) - backup this directory before deleting (it contains your AVDs, your debug signing key or other things you might wish to return to later) - yes, this was the thing that really helped
  • create new AVD - you have to do this after deleting that .android directory (it did not work if I copied backed up AVD back there)

For reference, here is AVD configuration which works for me now (created directly using Android SDK, not using the wizard in Android Studio):

  • Device: Nexus One (3.7", 480 x 800: hdpi)
  • Target: Android 7.0 - API Level 24
  • CPU/ABI: Intel Atom (x86_64)
  • Keyboard: [x] Hardware keyboard present
  • Skin: Skin with dynamic hardware controls
  • Front Camera: None
  • Back Camera: None
  • RAM: 1024
  • VM Heap: 64
  • Internal Storage: 200 MiB
  • SD Card: (empty)
  • [ ] Snapshot (unchecked)
  • [ ] Use Host GPU (unchecked)
Milan Laslop
  • 199
  • 2
  • 6