将 Android Studio 升级到 2.0 后,Android 模拟器无法在 Ubuntu 上运行 - 找不到 Qt 库 [英] Android Emulator does not work on Ubuntu after upgrading Android Studio to 2.0 - Qt library not found

查看:27
本文介绍了将 Android Studio 升级到 2.0 后,Android 模拟器无法在 Ubuntu 上运行 - 找不到 Qt 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我将我的 Android Studio 安装升级到了 2.0 版.我手动更新了它(下载 .zip,因为更新机制只是告诉我有一个新版本,但没有提供在 Android Studio 中直接更新的可能性).当我现在尝试启动模拟器时,收到以下错误消息:

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:

错误:./android/qt/qt_setup.cpp:33:Qt 库未在/home/kcd/Android/Sdk/tools/lib/qt/lib 无法启动'/home/kcd/Android/Sdk/tools/qemu/linux-x86/qemu-system-x86_64':否这样的文件或目录

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

我检查了这个目录并注意到路径名是 .../qemu/linux-x86_64/qemu-system_x86_64 而不是 .../qemu/linux-x86/qemu-system_x86_64

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:

错误:./android/qt/qt_setup.cpp:33:Qt 库未在/home/kcd/Android/Sdk/tools/lib/qt/lib

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

模拟器:警告:VM 堆大小设置低于硬件指定的最小 228MB

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

此申请失败启动,因为它无法找到或加载 Qt 平台插件xcb".模拟器:警告:将 VM 堆大小设置为 384MB

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

我的系统是 Ubuntu 14.04 64 位.在更新到 Android Studio 2.0 之前,一切正常.

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

有人可以帮忙吗?

在测试了 Anurag Maheshwari 的答案后,这个错误消失了.然后我收到以下错误消息:

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

无法在模拟器中启动 AVD.输出:模拟器:警告:VM 堆大小设置低于硬件指定的最小 228MB 模拟器:警告:将 VM 堆大小设置为 384MB 模拟器:错误:无法加载 OpenGLES仿真库 [lib64OpenglRender]: lib64OpenglRender.so: Kann dieShared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht端口 5554 上的 gefunden 控制台,端口 5555 模拟器上的 ADB:错误:可以不初始化 OpenglES 仿真,使用 '-gpu off' 禁用它.

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.

我尝试使用'-gpu off',但它仍然不想启动...

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

推荐答案

我遇到了同样的问题.这可能是因为您的 64 位 linux 与您安装的 avd 不匹配.尝试从您的 Android sdk 位置复制lib"文件夹 -> ../Android/Sdk/tools/lib64/qt/lib 到 ../Android/Sdk/tools/lib/qt/lib它对我有用.

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.

这篇关于将 Android Studio 升级到 2.0 后,Android 模拟器无法在 Ubuntu 上运行 - 找不到 Qt 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆