错误:(27,13)无法解决:com.google.firebase:firebase-core:9.8.0

SaT*_*ech 14 android gradle android-studio

我正在尝试在我的应用中使用Firebase.

向Gradle添加三行后,我收到此错误:

错误:(27,13)无法解决:com.google.firebase:firebase-core:9.8.0

以下是我的代码的一些图像:

这是在Gradle应用程序中 这是别的 这是在Gradle应用程序中

为什么我收到此错误?

Ani*_*nan 16

确保Google Repository及其相关的目录已更新为最新版本.通过转到SDK Manager - > Extras部分进行检查.

在此输入图像描述

Firebase Doc Link


mal*_*din 8

我想,你需要更新谷歌存储库.尝试运行SDK管理器并检查是否有任何更新.

这里查看示例中的注释

dependencies {
  // ...
  compile 'com.google.firebase:firebase-core:9.8.0'

  // Getting a "Could not find" error? Make sure you have
  // the latest Google Repository in the Android SDK manager
}
Run Code Online (Sandbox Code Playgroud)

收到"找不到"错误?确保您在Android SDK管理器中拥有最新的Google Repository

转到SDK Manager - > Extras并检查更新.

SDK管理器的快照