Google Play Services 9.2.0缺少类 [英] Google Play Services 9.2.0 missing classes
问题描述
在6月28日的Google Play Services 9.2.0更新之后,有一些缺失的类会阻止工作项目的编译:
After an update to Google Play Services 9.2.0 of 28th, June, there are some missing classes that prevent working projects from compiling:
错误:(24,35)错误:package com.google.android.gms.maps不存在
存在
Error:(24, 35) error: package com.google.android.gms.maps does not exist
谷歌地方相同,所以如果你更新到谷歌播放服务9.2.0,你的项目可能不会编译。
The same about Google Places, so if you updated to google play services 9.2.0, your project probably won't compile.
降级到9.0.2解决了这个问题:
Downgrading to 9.0.2 solves the problem:
compile'com。 google.android.gms:play-services-location:9.0.2'
compile 'com.google.android.gms:play-services-location:9.0.2'
有谁知道如何解决9.2版问题.0?
Does anyone know how to fix the issue in version 9.2.0?
推荐答案
只需添加地图库:
Just add the maps library:
compile 'com.google.android.gms:play-services-maps:9.2.0'
和places库:
and the places library:
compile 'com.google.android.gms:play-services-places:9.2.0'
play-services-location
9.0.2取决于并自动引入您的项目 play-services-maps
和 play-services-places
,看看 play-services-location-9.0.2.pom
。版本9.2.0不再那么做了,所以您可以将它添加为您的项目依赖项。
play-services-location
9.0.2 depends on and automatically brings into your project play-services-maps
and play-services-places
, have a look at play-services-location-9.0.2.pom
. Version 9.2.0 doesn't do that anymore so it is up to you to add it as your project dependency.
对于其他缺失的类,您可以在此处查找以查找(参见表1 个别API和相应的build.gradle描述): https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project
For other missing classes you can check here to find the right package (see Table 1 Individual APIs and corresponding build.gradle descriptions): https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project
这篇关于Google Play Services 9.2.0缺少类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!