选择性 Google 播放服务 API 未找到 类
Selective Google Play Services API not finding classes
我已将播放服务更新到最新版本,目前为 9.2.0,我还想为 google 播放服务使用选择性模块.
// compile 'com.google.android.gms:play-services:9.2.0'
compile 'com.google.android.gms:play-services-maps:9.2.0'
compile 'com.google.android.gms:play-services-analytics:9.2.0'
compile 'com.google.android.gms:play-services-gcm:9.2.0'
compile 'com.google.android.gms:play-services-location:9.2.0'
我遇到的问题是,现在导入如下:
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.AutocompleteFilter;
import com.google.android.gms.location.places.AutocompletePrediction;
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.PlaceBuffer;
import com.google.android.gms.location.places.Places;
无法再解决,尽管在他们的文档中指出位置服务也应提供地点功能。
有人可以帮我解决这个问题吗?谢谢。
根据@Selvin 添加的评论,我设法找到了解决问题的方法。
似乎在版本 9.x.x、Google Play Services API for Places已从 play-services-location
移至 play-services-places
。
因此,现在我对 Google Play Services APIs 有以下依赖项:
// compile 'com.google.android.gms:play-services:9.2.0'
compile 'com.google.android.gms:play-services-maps:9.2.0'
compile 'com.google.android.gms:play-services-analytics:9.2.0'
compile 'com.google.android.gms:play-services-gcm:9.2.0'
compile 'com.google.android.gms:play-services-location:9.2.0'
compile 'com.google.android.gms:play-services-places:9.2.0'
我已将播放服务更新到最新版本,目前为 9.2.0,我还想为 google 播放服务使用选择性模块.
// compile 'com.google.android.gms:play-services:9.2.0'
compile 'com.google.android.gms:play-services-maps:9.2.0'
compile 'com.google.android.gms:play-services-analytics:9.2.0'
compile 'com.google.android.gms:play-services-gcm:9.2.0'
compile 'com.google.android.gms:play-services-location:9.2.0'
我遇到的问题是,现在导入如下:
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.AutocompleteFilter;
import com.google.android.gms.location.places.AutocompletePrediction;
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.PlaceBuffer;
import com.google.android.gms.location.places.Places;
无法再解决,尽管在他们的文档中指出位置服务也应提供地点功能。
有人可以帮我解决这个问题吗?谢谢。
根据@Selvin 添加的评论,我设法找到了解决问题的方法。
似乎在版本 9.x.x、Google Play Services API for Places已从 play-services-location
移至 play-services-places
。
因此,现在我对 Google Play Services APIs 有以下依赖项:
// compile 'com.google.android.gms:play-services:9.2.0'
compile 'com.google.android.gms:play-services-maps:9.2.0'
compile 'com.google.android.gms:play-services-analytics:9.2.0'
compile 'com.google.android.gms:play-services-gcm:9.2.0'
compile 'com.google.android.gms:play-services-location:9.2.0'
compile 'com.google.android.gms:play-services-places:9.2.0'