2017-04-06 147 views
4

我一直在使用MapView为我的应用程序,它一直工作正常。突然间,用我的应用程序时坠毁,出现以下错误谷歌地图API崩溃(使用Android模拟器)

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
  • 时,也发生

任何帮助表示赞赏!

+0

请张贴整个logcat的错误 –

回答

1

看起来问题在于仿真器图形。在创建新仿真器时,仿真性能有一些选项。仿真性能有三个选项自动,硬件GLES软件GLES

选择软件GLES并查看结果。 -map会稍微慢一些,但比有错误要好。

点击附件图片链接在哪里可以选择仿真性能

where to choose Emulated Performance

+1

这使得它的工作,谢谢!现在我必须弄清楚为什么硬件GLES不能正常工作...... – Tmarsh2