Android 模拟器不会在 Ubuntu 17.04 上启动

标签 android emulation ubuntu-17.04

我已经下载了 Android Studio 2.3.3,目前,我正在尝试运行自动生成的基本 Hello World Activity 。当我尝试启动模拟器时,它没有启动。

这是一个已知的错误还是只是错误的配置?我也很惊讶只有 2.3.3 版本适用于 Linux。

最佳答案

模拟器附带一个 bundle 的 libstdc++.so 文件。在某些情况下, bundle 文件与您的系统不兼容。使用系统中可用的 libstdc++.so.6 而不是与 Android SDK bundle 在一起的库可能会解决此问题。

要使用系统的 libstdc++.so 文件,请编辑位于您的主文件夹中的 .profile 文件,并将其附加到文件末尾:

export ANDROID_EMULATOR_USE_SYSTEM_LIBS=1

来自 Android Studio Environment Variables reference 的文档:

Contains a value of 0 (default) or 1. A value of 1 means to use the system's libstdc++.so file instead of the one that comes bundled with the emulator. Set this environment variable only when the emulator does not start on your Linux system because of a system library problem. For example, some Linux Radeon GL driver libraries require a more recent libstdc++.so file.

Note:

There is no guarantee that setting this environment variable to 1 will make the emulator runnable. It is a work-around for system library issues that affect a very small number of Linux users.

关于Android 模拟器不会在 Ubuntu 17.04 上启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44475576/

相关文章:

android - 如何在 Intent 中广播可打包对象?

android - 在真实手机上调试 Android 数据库

android - Android Oreo 上不显示圆形应用程序图标

android - 如何将 Eclipse 链接到 YouWave?

java - 不幸的是,Android 模拟器 HelloFacebookSample 已经停止

python - 在 Ubuntu 17.04 中使用 Python 2.7 安装 OpenCV 3.2.0

angularjs - ng-serve 无法在 ubuntu 上运行

android - 如何在 Fragment 中为微调器设置 ArrayAdapter

android - 当我尝试向模拟器发送位置更新时,我收到一条错误消息

android - 无法在 Android Studio 中更改 AVD 的模拟性能