可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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:
I tried to use '-gpu off', but it still does not want to start...
回答1:
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:
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.
回答3:
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
回答4:
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.
回答5:
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 /emulator/lib64 /tools/lib64