我无法使用命令运行 AVD:Sdk/tools/android avd
但如果通过 Android Studio 启动,AVD 就可以工作。
我尝试了这些命令,但没有任何变化:
cd Android/Sdk/emulator/lib64/libstdc++
mv libstdc++.so.6 libstdc++.so.6.bak
ln -s /usr/lib64/libstdc++.so.6
错误信息:
Starting emulator for AVD 'Android_2.3.3API-10_2.7inch'
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 60
Current serial number in output stream: 59
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 60
Current serial number in output stream: 59
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
emulator: WARNING: Classic qemu does not support SMP. The hw.cpu.ncore option from your config file is ignored.
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 42
Current serial number in output stream: 43
QObject::~QObject: Timers cannot be stopped from another thread
答案1
我刚刚找到了类似问题的解决方案这里:
这些是解决模拟器问题需要遵循的具体步骤:
更改目录:
$ cd ~/Android/Sdk/emulator/lib64/libstdc++
创建到库的符号链接:
$ mv libstdc++.so.6 libstdc++.so.6.bak
在同一目录下:
$ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6
这应该可以解决问题!应用后,虚拟设备立即开始运行。