解析失败:com.google.android.libraries.places:1.0.0:

Failed to resolve: com.google.android.libraries.places:1.0.0:

我想使用 Google 地方 API 但我无法将项目与 "com.google.android.libraries.places:1.0.0:" 依赖项同步。如何在我的项目中添加地方

documentation 中的库我猜是错误的,使用它,它可以工作。 几天前我遇到了同样的问题,就他们仍然没有解决的文档向他们提供了反馈。

implementation 'com.google.android.libraries.places:places:2.1.0'

您可以查看如何在 here

上添加地点自动完成

编辑: 看来他们终于修复了文档

我也遇到了同样的问题,现在我删除了这个问题。根据google, "The v1.0.0 release of the Places SDK for Android introduces an all-new static library with updated functionality. The Google Play Services version of the Places SDK for Android (in Google Play Services 16.0.0) is deprecated as of January 29, 2019, and will be turned off on July 29, 2019."

添加以下依赖项它将起作用...

实施'com.google.android.libraries.places:places:1.0.0'

更多信息您可以访问, https://developers.google.com/places/android-sdk/client-migration

尝试改变

compileOnly "com.facebook.react:react-native:+"

来自

api "com.facebook.react:react-native:+"