Android模拟器中的Google Play服务已过期

时间:2015-12-21 12:32:39

标签: android google-play-services emulation

我有一个带有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

2 个答案:

答案 0 :(得分:1)

我之前尝试解决此问题的方法是更改​​:

|  ABC_DEF | DESCRIPTION |
|----------|-------------|
| 0999     |   TEST INFO |

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

有时候,在gradle上反映的不是实际版本,通过compile 'com.google.android.gms:play-services:7.+' ,应用程序将自动使用最新版本。

答案 1 :(得分:0)

以下是解决方案:使用内置Google Play服务的AVD图像。它将使您能够使用Google服务,包括Google Play。此外,您无需重新创建AVD图像即可更新它。

打开AVD管理器,然后选择创建新设备。您应该将设备定义与play store图标一起使用。

1

然后为它选择系统图像。您应该选择 Google Play NOT 与Google API一起使用。

2

然后启动新设备。

3

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

4

相关问题