【问题标题】:Google Maps API v2 has stopped on real deviceGoogle Maps API v2 已在真实设备上停止
【发布时间】:2013-07-08 01:17:09
【问题描述】:

当我安装了 Google Play 服务后,我的应用程序可以正常工作,但如果没有它,当我打开它时应用程序会停止。很清楚,但是当我添加检查 Google Play 服务是否在设备上可用以及何时不可用的方法时,它应该显示错误对话框,但是它。应用程序也打不开。

这是我从其他帖子中复制的代码。我尝试通过我的代码执行此操作,但它也不起作用。

方法:

public void checkGooglePlayServicesAvailability()
      {
          int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
          if(resultCode != ConnectionResult.SUCCESS)
          {
              Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 1);
              dialog.setCancelable(false);
              dialog.show();
          }

          Log.d("GooglePlayServicesUtil Check", "Result is: " + resultCode);
      }

调用 onResume():

@Override
    protected void onResume()
    {
          checkGooglePlayServicesAvailability();

          super.onResume();
    }

我也安装了谷歌地图。也许有人可以帮助我?

编辑:LogCat:

07-07 15:33:39.150: E/Trace(3448): error opening trace file: No such file or directory (2)
07-07 15:33:41.361: E/Google Maps Android API(3448): Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above
07-07 15:43:15.820: E/Google Maps Android API(3524): Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above
07-07 16:06:55.349: E/Trace(3615): error opening trace file: No such file or directory (2)
07-07 16:06:57.841: E/Google Maps Android API(3615): Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above

【问题讨论】:

  • 你能发布堆栈跟踪吗?

标签: android api maps


【解决方案1】:

你的super.onResume();应该在你调用其他方法之前被调用

【讨论】:

  • 我在这两种情况下都试过了,但都不起作用,我现在在其他方法之前调用了 super.onResume()。
【解决方案2】:

我认为您的问题是您尝试使用的设备不支持 OpenGL ES 2.0 功能。尝试使用支持该功能的设备。

【讨论】:

  • 我认为不可能。我写道,当我从其他应用程序的链接下载谷歌播放服务时,我的应用程序工作正常。
  • 堆栈跟踪告诉您当前设备不支持该功能。您是否设法在同一台设备上运行您的应用程序,或者您必须使用另一台设备?你用的是什么设备?
  • 我正在使用另一台设备 - HTC Wildfire S with android 2.3.3
  • 原来的设备是什么?
  • Orginal(emulator) 是 android 4.2.2 的一些设备
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多