Android将API:Google Play服务在Emulator上过时

Android将API:Google Play服务在Emulator上过时,android,android-emulator,google-play-services,google-places-api,Android,Android Emulator,Google Play Services,Google Places Api,我正在尝试在我的Android应用程序中使用Google Places API的PlacePicker。但是,每当我尝试创建选择器时,都会收到以下错误消息: Google Play services out of date. Requires 7095000 but found 6774470 不幸的是,我不得不在模拟器上进行测试,因为我没有物理设备。模拟器的映像是API级别22 x86,带有Google API目标。此外,我还试图通过build.gradle文件包含Google Play S

我正在尝试在我的Android应用程序中使用Google Places API的PlacePicker。但是,每当我尝试创建选择器时,都会收到以下错误消息:

Google Play services out of date. Requires 7095000 but found 6774470
不幸的是,我不得不在模拟器上进行测试,因为我没有物理设备。模拟器的映像是API级别22 x86,带有Google API目标。此外,我还试图通过build.gradle文件包含Google Play Services库:

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

此外,我还更新了SDK管理器中的Google Play服务。我做错了什么?如何更新我的Google Play服务以便使用Places API?

我在android wear上使用Google Play服务时遇到了类似的问题,然后我通过更新我的android wear应用程序版本来解决。(因为较新的android wear版本包括较新的Google Play服务)

此问题由设备上的Google Play services版本太旧引起,您应该更新设备上的Google Play services版本


对于emulator,你需要在你的emulator上更新Google Play服务,而不是更新你的SDK

工具>Android>SDK管理器中更新你的软件包,然后检查附加服务中有更新可用的所有软件包

完成此操作后,在(应用程序)build.gradle中使用以下依赖项

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

我也遇到了同样的问题,不得不使用谷歌应用程序升级到API 21模拟器图像。那一个更为最新,而且有效。

我也遇到了同样的问题,现在我将版本“更新”到6774480,使缓存失效并重新启动,然后我“降级”了依赖项
编译'com.google.android.gms:play services:6+'

它是有效的,我知道这不是一个真正的解决方案,但这是一个不好的方法,使它工作,所以我可以测试我的应用程序

我只有这个问题与API 22模拟器。21和23都很好,我没有物理设备的问题

我很想知道这个低版本对GCM是否至关重要,所以修改了代码以继续:

if (checkPlayServices()) {
              // Start IntentService to register this application with GCM.
              Intent intent = new Intent(this, ImpatientRegistrationIntentService.class);
              startService(intent);
} else {<<--   Added this as a bypass as my emulator complained about versions
              Intent intent = new Intent(this, ImpatientRegistrationIntentService.class);
              startService(intent);
}
if(checkPlayServices()){
//启动IntentService以向GCM注册此应用程序。
Intent Intent=新的Intent(这个,registrationtentservice.class);
startService(意向);

}否则{正如其他人所说,原因可能是AVD中安装的Google Play不符合依赖项要求。除了其他人建议的解决方案外,我还尝试将所需的Google Play版本从8.3降低到8.1,问题就解决了。

如果SDK管理器显示您已经安装了最新版本,您可以只需复制仿真器定义

复制的模拟器将加载最新版本的SDK


这是我想出的一个解决办法,因为这里的解决方案都不适合我。此外,我不想更新代码以使用较旧版本的play服务。我最终用google play而不是google API安装了模拟器,当出现提示时,我只需单击update。这将带您到google play你所要做的就是从那里更新play服务。这里唯一要注意的是,这种方法要求你使用google帐户登录emulator。但对于我的用例来说,这就足够了。 我的日志是

Google Play服务已过时。需要12210000,但找到11947270

所以我修改了build.gradle的代码

implementation 'com.google.android.gms:play-services-maps:12.0.0'


检查这个问题的解决方案:我检查了这个问题的解决方案,但我已经在使用最新的模拟器映像,所以我认为它没有帮助。可能在这里你会找到你的解决方案[1]:我也有同样的问题(需要7327000,但找到6774470)…有解决方案吗?如何在模拟器上更新?我在模拟器中找不到Play Store。您可能需要使用较新版本的AVD(Android虚拟设备)目标。这是模拟器的问题吗?这不会发生在真正的设备上?@Igor Ganapolsky当用户不更新其Google Play服务时,可能会发生这种情况,但问题的解决取决于用户。这并不控制模拟器上安装的Play Services版本。@IgorGanapolsky它会做什么?@gotnull这意味着如果emulator没有安装最新版本的Play Services,您无能为力。这个屏幕截图来自哪个屏幕?好吧,对于android来说,还有一件不那么烦人的AF事情要处理!
implementation 'com.google.android.gms:play-services-maps:11.0.0'