【问题标题】:Google Maps API Crashing (Using Android Emulator)Google Maps API 崩溃(使用 Android 模拟器)
【发布时间】:2017-04-06 14:11:52
【问题描述】:

我一直在为我的应用程序使用MapView,它运行良好。突然,当使用我的应用程序时,它崩溃并出现以下错误

  04-06 14:03:45.084 6969-7008/info.tommarsh.testmap E/EGL_emulation: rcCreateContext returned 0
04-06 14:03:45.084 6969-7008/info.tommarsh.testmap E/EGL_emulation: tid 7008: eglCreateContext(1284): error 0x3003 (EGL_BAD_ALLOC)
04-06 14:03:45.085 6969-7008/info.tommarsh.testmap E/AndroidRuntime: FATAL EXCEPTION: GLThread 185
                                                                     Process: info.tommarsh.testmap, PID: 6969
                                                                     java.lang.RuntimeException: createContext failed: 12291
                                                                         at com.google.maps.api.android.lib6.gmm6.vector.bi.a(:com.google.android.gms.DynamiteModulesB:834)
                                                                         at com.google.maps.api.android.lib6.gmm6.vector.bj.f(:com.google.android.gms.DynamiteModulesB:20825)
                                                                         at com.google.maps.api.android.lib6.gmm6.vector.bj.run(:com.google.android.gms.DynamiteModulesB:881)

现在,每次我输入使用MapView 的片段或活动时,都会发生完全相同的错误。有几点需要注意:

  • 这发生在我尝试过的每个模拟器上(x86 和 x86_64 ABI)
  • 尝试启动MapFragment 时也会发生这种情况
  • 我使用的是地图 10.2.1 版

任何帮助表示赞赏!

【问题讨论】:

  • 请发布整个 Logcat 错误

标签: android google-maps google-maps-api-3


【解决方案1】:

看起来问题出在模拟器图形上。在创建新模拟器时,Emulated performance 中有一些选项。模拟性能有 AutomaticHardware GLESSoftware GLES 三个选项。

选择软件 GLES 并查看结果。 -map 会慢一些,但总比出错好。

点击附图链接,选择Emulated Performance

where to choose Emulated Performance

【讨论】:

  • 这使它工作,谢谢!现在我必须弄清楚为什么硬件 GLES 不起作用......
猜你喜欢
  • 2016-05-13
  • 2013-10-03
  • 1970-01-01
  • 1970-01-01
  • 2013-05-11
  • 2012-11-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多