【问题标题】:Google Play Services out of date in Android EmulatorAndroid 模拟器中的 Google Play 服务已过期
【发布时间】:2017-09-16 04:04:52
【问题描述】:

我有一个带有 Marshmallow 和 Google APIs 的 android 模拟器。 出于某种原因,Google Play 服务卡在 8.1.85 版中并且没有得到更新。 我的应用使用 Android Studio Gradle 中的 8.3 版本:

compile 'com.google.android.gms:play-services:8.3.0'

当应用程序启动时,它会检测到它已过期,因此会出现“更新对话框”。单击更新它什么也不做。我得到了这个日志:

12-21 12:21:46.369 3516-3516/app.pack.com W/GooglePlayServicesUtil: Google Play services out of date.  Requires 8298000 but found 8185470
12-21 12:21:46.548 3516-3541/app.pack.com W/EGL_emulation: eglSurfaceAttrib not implemented
12-21 12:21:46.548 3516-3541/app.pack.com W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xabff10c0, error=EGL_SUCCESS
12-21 12:21:46.685 3516-3541/app.pack.com W/EGL_emulation: eglSurfaceAttrib not implemented
12-21 12:21:46.686 3516-3541/app.pack.com W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3f09320, error=EGL_SUCCESS
12-21 12:21:47.065 3516-3541/app.pack.com W/EGL_emulation: eglSurfaceAttrib not implemented
12-21 12:21:47.065 3516-3541/app.pack.com W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3f3f240, error=EGL_SUCCESS
12-21 12:21:50.302 3516-3541/app.pack.com E/Surface: getSlotFromBufferLocked: unknown buffer: 0xab7980b0
12-21 12:21:56.326 3516-3516/app.pack.com E/SettingsRedirect: Can't redirect to app settings for Google Play services
12-21 12:21:56.333 3516-3541/app.pack.com E/Surface: getSlotFromBufferLocked: unknown buffer: 0xab796d70
12-21 12:21:56.339 3516-3541/app.pack.com D/OpenGLRenderer: endAllStagingAnimators on 0xa19fa980 (RippleDrawable) with handle 0xb12c9ac0
12-21 12:21:56.366 3516-3516/app.pack.com W/GooglePlayServicesUtil: Google Play services out of date.  Requires 8298000 but found 8185470
12-21 12:21:56.432 3516-3541/app.pack.com W/EGL_emulation: eglSurfaceAttrib not implemented
12-21 12:21:56.432 3516-3541/app.pack.com W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xad71b0c0, error=EGL_SUCCESS
12-21 12:21:56.793 3516-3541/app.pack.com W/EGL_emulation: eglSurfaceAttrib not implemented
12-21 12:21:56.793 3516-3541/app.pack.com W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3f3f920, error=EGL_SUCCESS
12-21 12:22:00.027 3516-3541/app.pack.com E/Surface: getSlotFromBufferLocked: unknown buffer: 0xab798e40

【问题讨论】:

  • 您是否尝试过在 SDK 管理器中更新您的模拟器图像,然后创建一个新的 AVD?
  • 是的,好几次。我想我最近收到了一些更新。我还创建了新的 AVD,但它们始终是使用 8.1.85 创建的
  • 我的 AVD 有 8.1.85 而我的应用需要 8.3.0,如何更新 AVD?
  • 我终于得到了一个 8.3 的 sdk 更新

标签: android google-play-services emulation


【解决方案1】:

我之前为这个问题尝试过的解决方案是改变:

compile 'com.google.android.gms:play-services:8.3.0'

compile 'com.google.android.gms:play-services:7.+'

有时,gradle 上反映的不是实际版本,通过输入+,应用程序将自动使用可用的最新版本。

【讨论】:

    【解决方案2】:

    这里是解决方案:使用带有内置 Google Play 服务的 AVD 图像。它将使您能够使用包括 Google Play 在内的 Google 服务。此外,您无需重新创建 AVD 图像即可对其进行更新。

    打开 AVD 管理器并选择创建新设备。您应该使用带有 Play 商店图标的设备定义。

    然后为其选择系统映像。您应该选择一个使用 Google PlayNOT 使用 Google API。

    然后启动新设备。

    您可以更新播放服务,如屏幕截图所示,或在设备上手动更新..

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-14
      • 2015-08-02
      • 2013-07-14
      • 2013-07-18
      • 2014-04-04
      相关资源
      最近更新 更多