Google Play定位服务9.2.0缺少Google归档Android资源

man*_*uti 3 android gradle google-play-services location-services

我试图在Android应用中将Google Play服务的依赖关系从9.0.2升级到9.2.0,即Locations API:

dependencies {
   ...
   compile 'com.google.android.gms:play-services-location:9.2.0'
   ...
}
Run Code Online (Sandbox Code Playgroud)

API从SDK Manager下载:

  • Google Play服务,第31版
  • Google Repository,第29版

但是,代码无法再编译,因为找不到可绘制资源,特别是@drawable/powered_by_google_light(Google的归因图像).

检查下面的AAR sdk_location/extras/google/m2repository/com/google/android/gms/play-services-location/9.2.0,似乎缺少资源.实际上,resAAR中的文件夹是空的.但它存在于版本9.0.2中.

有没有人遇到过这个?我尝试从SDK Manager中多次重新安装存储库.

man*_*uti 5

通过在Places API上添加依赖项解决了问题:

dependencies {
   ...
   compile 'com.google.android.gms:play-services-location:9.2.0'
   compile 'com.google.android.gms:play-services-places:9.2.0'
   ...
}
Run Code Online (Sandbox Code Playgroud)

在该版本之前,似乎隐式声明了Places依赖项.

还相关:Google Play Services 9.2.0缺少课程