Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting Android emulator failed: QXcbConnection: Could not connect to display

Tags:

android

I would like to do some debugging(Android native program without GUI) on a remote server which doesn't have display.

The command is:

./emulator -writable-system -avd Pixel_XL_API_25 -no-snapshot-load -qemu -no-skin -no-audio -no-window  -v

Error msg:

emulator: WARNING: System image is writable
QXcbConnection: Could not connect to display
Aborted

I have the -no-window option why it still tried to connect to display? I searched through Internet. It looks like it's a QT bug. Any idea to walk around it?

I tried to set the DISPLAY env var by export DISPLAY=:0. It doesn't work out.

like image 301
JACK M Avatar asked Mar 09 '18 14:03

JACK M


People also ask

Why Android emulator is not opening?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.

How do I close the Android emulator?

To stop a running emulator, click Menu and select Stop.

Is Android studio an emulator?

The Android Emulator enables you to test your app on many different devices, virtually. The emulator comes with Android Studio by default, so you shouldn't have to manually install it. The basic workflow with the emulator goes as follows: Verify that you have the system requirements.


1 Answers

export DISPLAY=:0

Works for me on Ubuntu 18.04 Removing android studio and reinstall from Ubuntu Software Store also resolved for me.

like image 92
Tayyab Sarwar Avatar answered Oct 17 '22 22:10

Tayyab Sarwar