3

All AVD images work on my machine except for Android 9.+ (Google Play) & Android 9.+ (Google APIs) (the Android Studio emulator for Android Q beta).
I just downloaded the most recent images. From android-Q/google_apis_playstore/x86/build.prop:

ro.system.build.version.incremental=5506116
ro.system.build.version.release=10
ro.system.build.version.sdk=28

I am using Android Emulator version 29.0.11.

However, when I start these up, I see the device frame with a black screen. I get no error message, just nothing. It stays like this indefinitely.

Is there any way to debug this or is this a common issue?

Update: on another device (same image), I got the following screen instead of a black screen, however, there is still nothing I can do:

screen capture

creativecreatorormaybenot
  • 114,516
  • 58
  • 291
  • 402
  • Regarding the down votes: I know that I have not provided much information, but this is all I could gather. As I said, I did not find a way to debug this as I am just seeing a black screen and nothing else. Hence, it would be very beneficial if there was a way to [start debugging this problem](https://www.google.com/search?q=how+to+debug+avd+failing+start+up&ie=utf-8&oe=utf-8). – creativecreatorormaybenot May 14 '19 at 14:21
  • Regarding the UP vote : I do not see any valid reason, for the down voter, who down voted without any comment. Regarding_The_Solution : Its a odd solution but try uninstalling android_studio, install it again with most needed sdks & platform tools. As you are developer, you know how many dependencies co-exists..!! If One gets inappropriate, then all further dependent things goes in vein. – sandhya sasane Jun 03 '19 at 09:29
  • You could try running the emulator via the command-line to see if you get any more error messages which can aide in debugging, (See: https://stackoverflow.com/questions/4974568/how-do-i-launch-the-android-emulator-from-the-command-line). – oxr463 Jun 05 '19 at 17:19
  • I am not sure it will work but just try setting cold boot mode from boot option. – Dhaval Solanki Jun 06 '19 at 07:55
  • @creativecreatorormaybenot could be a graphic related issue which I faced, my system dedicated graphics card had low memory, so ran into open gl issue while running pie on nexus 5x. you can delete your avd from .android folder, re create the device, load the pie image and run a cold boot – hemen Jun 06 '19 at 09:02

5 Answers5

2

You need to configure correctly the Hardware Acceleration for your Emulator. Please, follow these steps:

1) Install the Intel HAXM driver if you are on Windows and have Intel, follow these steps:

  • Open the SDK Manager.
  • Click the SDK Update Sites tab and then select Intel HAXM.
  • Click OK.
  • After the download finishes, run the installer. Typically, you can find the installer in the following location: sdk\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm-android.exe
  • Use the wizard to complete the installation.
  • After installing Intel HAXM, confirm that the virtualization driver is operating correctly by entering the following command in a Command Prompt window:
    sc query intelhaxm

You should see a status message that includes the following information:

SERVICE_NAME: intelhaxm
       ...
       STATE              : 4  RUNNING
       ...

For Linux, check this link

For Mac, check this link

2) Open AVD Manager on Android Studio:

  • Edit the Virtual Device where you set target Android Q
  • Click Show Advanced Settings.
  • Set Graphics to Automatic or Hardware.
Lucas
  • 1,224
  • 1
  • 14
  • 21
  • 1
    This does not help with the problem because of two reasons. First, all other emulators (older versions) *run fine*. This includes having Intel HAXM installed because it is done automatically (or part of the process) when installing Android Studio for the first time. Second, I cannot change the `Graphics` setting. It is locked to `Automatic`. – creativecreatorormaybenot Jun 05 '19 at 15:45
  • It could be possible that other emulators run ok with software acceleration. HAXM is not allways installed automatically with android studio. If you cannot change the graphics setting is because you have another wrong configuration. – Lucas Jun 06 '19 at 22:12
  • 1
    This worked for me, I think that for whatever reason it didn't install for me (even though I removed android studio completely and reinstalled it) – ekatz Jun 11 '19 at 21:43
  • Android Studio 3.5.3 is failing to start any and all emulators, meanwhile HAXM is installed and emulators are all have Graphics setting on `Automatic`. Android Studio 4.0.0 Canary 9 also fails to start emulators and fails to build the project. – straya Feb 20 '20 at 05:16
1

In my case all other emulators started, except Q. I have all needed SDK and AVDs.

enter image description here

But every time emulator didn't start without any error.

I saw Emulator in Android Studio doesn't start and found a way to understand a reason. I started from avd path:

D:\Android\emulator\emulator.exe -avd Pixel_2_API_29 -netspeed full -netdelay none

and got an error: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [D:\Android]!. In PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value I found that we should read config.ini inside 'Pixel_2_API_29.avd' folder and detect the line

image.sysdir.1=system-images\android-29\google_apis_playstore\x86\

I understood that I missed android-29 image in SDK path!

I knew that moved SDK and AVD folders from C:... to D:\Android, but SDK was kept in two folders.

enter image description here

And I forgot to change one system variable (ANDROID_HOME):

enter image description here

So I changed it to D:\Android and restarted the PC.

After restarting I deleted old SDK folder (in 'AppData\Local\Android'). Then I started again:

D:\Android\emulator\emulator.exe -avd Pixel_2_API_29 -netspeed full -netdelay none
CoolMind
  • 26,736
  • 15
  • 188
  • 224
  • Also create emulator based on `Google APIs` image, see https://stackoverflow.com/questions/46898322/emulator-5554-unauthorized-for-adb-devices. In this case you won't get a message: `emulator-5554 unauthorized`. – CoolMind Aug 08 '19 at 09:16
1

Android 11 (R) emulator was not working for my case. I fixed it with the following steps.

Step 1: Go to SDK manager -> SDK Platforms and install your required API level ( Like Android 11.0, Android 10.0, etc. For my case Android 11.0 was not installed that's why it was not working )

Step 2: Go to SDK manager -> SDK Tools and install Intel Emulator Accelerator (HAXM installed) if not yet installed. If you are a windows user then make sure that windows firewall is deactivated for a while otherwise it will not be installed and generate an error.

Step 3: Wipe data and Cold boot the device from ADV manager.

If the above steps are not worked then Invalidate caches and Restart your android studio as well as the PC.

Gk Mohammad Emon
  • 6,084
  • 3
  • 42
  • 42
0

I fixed it by reinstalling Android Studio entirely.
Actually, I just wanted to reinstall the Android SDK, however, you seem to need to install a stable version of Android Studio for that. After that, I set everything up the same way again and ran the beta version and now it works.

creativecreatorormaybenot
  • 114,516
  • 58
  • 291
  • 402
-1

Had the same problem on macOS. Found out that I didn't have enough space on disk to create 'userdata partition'. So check that.

Hlib Barylskyi
  • 865
  • 1
  • 7
  • 11