Android 模拟器导致 linux 崩溃并出现错误?

标签 android linux android-emulator crash android-virtual-device

基本上,我一直在 Android Studio 中使用 Ubuntu,我有一个非常简单的应用程序,我试图在模拟器上运行它。

现在,应用程序实际上在模拟器内启动得很好,但当屏幕键盘出现时就会出现问题。一旦它出现,并且您单击一个键,模拟器就会崩溃并出现以下错误:

emulator64-arm: ../../sdk/emulator/opengl//host/libs/Translator/include/GLcommon/GLutils.h:48: unsigned int SafeUIntFromPointer(const void*): Assertion `(uintptr_t)(ptr) == (unsigned int)(uintptr_t)(ptr)' failed.

我已尝试在应用程序外部使用键盘,但问题仍然存在,因此我认为可以安全地假设不是应用程序导致了该问题。

我尝试过的其他事情是:

  • noaudio(在没有音频的情况下启动模拟器,因为我发现一些帖子表明它可能会导致卡住。这当然没有帮助)
  • 未勾选“使用主机 GPU”(这实际上导致模拟器黑屏)

有人知道任何解决方法吗?

最佳答案

This issue was fixed in the Android Open Source Project (AOSP) repo但尚未移植到 4.0.3,因此您在使用使用 API 15 构建的模拟器时会注意到此问题。

解决方法是关闭“使用主机 GPU”

如果您使用的是 android studio,则此选项位于此处:

Turn off host GPU option in AVD settings for device

当然,这确实会减慢模拟器的速度,但拥有一个缓慢的模拟器总比拥有一个因为不断崩溃而无法使用的模拟器要好。截至 2014 年 12 月 11 日,the latest update是:

we are going to release updates for older system image, stay tuned...

关于Android 模拟器导致 linux 崩溃并出现错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26912055/

相关文章:

linux - 如果时间戳大于一分钟则打印

android - aapt.exe 已停止工作

linux - 如何在同一台服务器上显示另一个端口网站的nginx 80数据?

C++读取多个文本文件(Ubuntu)

Android:在 ec2 实例上安装时如何解决模拟器错误?

android - 从相机捕获的图像未显示(OnActivityResult)

Android 添加图像到按钮

android - 如何在 Jetpack Compose 中设置主题 `NavigationBar()` 和 `NavigationBarItem()`?

android - 未调用 setOnEditorActionListener

java - Android Emulator 插件在 Jenkins 中不起作用