11

Today, I updgraded my Android Studio installation to version 2.0. I updated it manually (download the .zip, because the update mechanism just telled me that there is a new version but offered no possibility for direct update in Android Studio). When I now try to start an emulator, I receive this error message:

ERROR:./android/qt/qt_setup.cpp:33:Qt library not found at /home/kcd/Android/Sdk/tools/lib/qt/lib Could not launch '/home/kcd/Android/Sdk/tools/qemu/linux-x86/qemu-system-x86_64': No such file or directory

I checked this directory and notices that the path name is .../qemu/linux-x86_64/qemu-system_x86_64 and not .../qemu/linux-x86/qemu-system_x86_64

So I renamed the direcory to match the correct path. After trying to launch the emulator, it puts this error message:

ERROR:./android/qt/qt_setup.cpp:33:Qt library not found at /home/kcd/Android/Sdk/tools/lib/qt/lib

emulator: WARNING: VM heap size set below hardware specified minimum of 228MB

This application failed to start because it could not find or load the Qt platform plugin "xcb". emulator: WARNING: Setting VM heap size to 384MB

My system is Ubuntu 14.04 64 bit. Before the update to Android Studio 2.0, everything worked fine.

Can anyone help?

EDIT: After testing the answer from Anurag Maheshwari, this error disappeared. Then I have got the following error message:

Cannot launch AVD in emulator. Output: emulator: WARNING: VM heap size set below hardware specified minimum of 228MB emulator: WARNING: Setting VM heap size to 384MB emulator: ERROR: Could not load OpenGLES emulation library [lib64OpenglRender]: lib64OpenglRender.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden console on port 5554, ADB on port 5555 emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.

I tried to use '-gpu off', but it still does not want to start...

KCD
  • 678
  • 5
  • 20

5 Answers5

5

I got the same problem. It may be occur due to your 64bit linux didn't match to the avd you installed. Try copy 'lib' folder from your Android sdk location -> ../Android/Sdk/tools/lib64/qt/lib to ../Android/Sdk/tools/lib/qt/lib It worked for me.

  • 2
    After updating the SDK, my entire Android/Sdk/tools/lib64 was missing. In the Android/Sdk/tools/ directory I typed "ln -s lib lib64" and now my old emulator command works. Seems like there was a problem with the update; this is a gross fix. – k-den Mar 24 '17 at 19:56
4

Finally I've managed it. While testing from command line (-gpu off), it does not seem to work, but when I use the Virtual Device Manager and choose "Emulated Performance - Graphics --> Software - GLES 2.0" instead of "Hardware - GLES 2.0", the emulator starts. Unfortunately, it a bit slower now, and I wonder why it worked before the upgrade, but my emulators are running for now.

KCD
  • 678
  • 5
  • 20
  • Now i am getting following error.....ERROR: Invalid GPU mode 'mesa', use one of: on off host guest – Tanvir Rahman Apr 16 '16 at 19:22
  • 2
    Strange, when I create a new emulator, I got this error, too. Try the following: Go to Virtual device manager, and click 'Show on Disk' in the menu of the Virtual device. Open the config.ini file and change the respective line: hw.gpu.mode=guest. This works for me. – KCD Apr 20 '16 at 08:17
  • @KCD it was auto, changed on guest. Doesn't work( p.s.also was mesa - same ( – Morozov Mar 14 '17 at 10:03
1

I had the same problem when i updated to Android Studio 2.0

You need to upgrade gradle to work with instant run..

Go to http://gradle.org/post-download-gradle/ and download the latest version of gradle

Unzip gradle inside this folder C:\Program Files\Android\Android Studio\gradle

Go to Android Studio File/Settings - Build, Execution, Deployment - Build Tools then gradle

Click use local gradle distribution and point to the the latest version of graddle you unzipped

  • 2
    I will give it a try tomorrow, but I don't understand what gradle has to do with the start of the emulator? – KCD Apr 17 '16 at 18:22
0

I hope this will solve your problem.
I had a freshly installed latest Android Studio and perform all basic steps to run a 'Hello World' project in emulator
but had a same problem while running emulator from avd manager.
After that i tried running emulator from command line also but faced same problem.
After long debugging i came to find out that it was missing some core library,
and then solved the problem by selecting checkbox and install emulator from Android Studio Options.

Tools -> Android -> SDK Manager -> SDK Tools -> Android Emulator

And click Apply and Run project again.
Now its working like a charm.Sample Screenshot

Deepanshu Jain
  • 558
  • 4
  • 5
0

I had the same problem trying to start the emulator on a Jenkins Job in a MacOS machine. After some search i noticed that the QT libraries were being required from the tools folder while their real location was the emulator folder. Making a link as described below solves the problem:

ln -s <SDK ROOT PATH>/emulator/lib64 <SDK ROOT PATH>/tools/lib64
Amaro
  • 501
  • 5
  • 10