gpt4 book ai didi

android - Google Play Location Services 9.2.0 缺少谷歌归因 Android 资源

转载 作者:太空宇宙 更新时间:2023-11-03 12:48:04 25 4
gpt4 key购买 nike

我试图在 Android 应用程序(即 Locations API)中将对 Google Play 服务的依赖项从 9.0.2 升级到 9.2.0:

dependencies {
...
compile 'com.google.android.gms:play-services-location:9.2.0'
...
}

API 是从 SDK Manager 下载的:

  • Google Play 服务,修订版 31
  • Google 知识库,修订版 29

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

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

有人遇到过吗?我多次尝试从 SDK 管理器重新安装存储库。

最佳答案

通过添加对 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'
...
}

似乎在那个版本之前,Places 依赖项是隐式声明的。

还相关:Google Play Services 9.2.0 missing classes

关于android - Google Play Location Services 9.2.0 缺少谷歌归因 Android 资源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38285219/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com