android - Google Play 服务在 Android 模拟器中已过时

标签 android google-play-services emulation

我有一个带有 Marshmallow 和 Google Apis 的安卓模拟器。 出于某种原因,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

最佳答案

这个问题我之前试过的解决方法是改成:

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

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

有时,gradle 中反射(reflect)的不是实际版本,通过放置 +,应用程序将自动使用可用的最新版本。

关于android - Google Play 服务在 Android 模拟器中已过时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34395790/

相关文章:

android - 无法更改 Google Play 服务 Activity 识别的请求间隔

c# - Chip8 仿真器 - 用户输入

android - 在模拟器上测试 Google map - CameraUpdateFactory 未初始化

Android studio 的模拟器没有启动

java - 使用 Appium 进行自动化时无法更改我的 Android 应用程序的个人资料图像

android - Android 5.0 及以上版本的 Asmack 登录问题

android - 为什么在外部存储中保存位图失败,即使位图已正确创建并且可以在 imageView 中显示?

android - eclipse 中的 Google Play 服务已停止工作

java - Unity3D : APK file missing

android - 使用 GoogleApiClient 进行 REST API 调用