2015-12-21 115 views
2

我有一个带有棉花糖和Google Apis的模拟器。 由于某些原因,Google Play服务在8.1.85版本中停滞不前,并且不会更新。 我的应用程序使用8.3版本Android Studio中摇篮:Google Play服务在Android模拟器中过时

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 
+0

您是否尝试过在SDK管理器更新您的模拟器映像,然后创建一个新的AVD ? – CommonsWare

+0

是的,好几次。我想最近我有几个更新。我也创建了新的AVD,但它们总是用8.1.85创建的 – Ton

+0

我的AVD的8.1.85和我的应用需要8.3.0,如何更新AVD? –

回答

0

下面是解决方案:使用带内置Google Play服务的AVD图像。它将使您能够使用Google服务,包括Google Play。此外,您可以在不重新创建AVD图像的情况下对其进行更新。

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

1

然后选择系统映像它。您应该选择一个与谷歌播放不是谷歌API。

2

然后启动新设备。

3

您可以更新Play服务,因为显示在屏幕截图,或手动设备上的..

4

1

我之前已经试过此问题的解决办法是改变:

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

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

有时,什么是反映在gradle这个是不是实际的版本,并通过将+该应用程序将自动使用最新版本。