无法更新Firebase依赖项(com.google.firebase) [英] Unable to update the Firebase dependency(com.google.firebase)

查看:203
本文介绍了无法更新Firebase依赖项(com.google.firebase)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将Firebase添加到Android应用程序中以进行推送通知.在使用之前,我已经更新了build.gradle.工作正常.

I have Added Firebase to android app for push notification. I have updated build.gradle before i have used. Its working fine.

 compile 'com.google.firebase:firebase-messaging:9.2.0'

现在我已更新到最新的图书馆,但出现错误.

now i have updated to latest library but getting error.

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

重建项目时出现错误

错误:配置项目':app'时发生问题. 无法解析配置':app:_debugApkCopy'的所有依赖项. 找不到com.google.firebase:firebase-core:10.0.1. 要求者: DGApp:app:未指定

Error:A problem occurred configuring project ':app'. Could not resolve all dependencies for configuration ':app:_debugApkCopy'. Could not find com.google.firebase:firebase-core:10.0.1. Required by: DGApp:app:unspecified

谢谢.

推荐答案

您必须通过独立SDK管理器更新Google Play服务和Google存储库.

You have to update your Google Play Services and Google Repository from the Standalone SDK Manager.

编辑:从最新版本的Android Studio起,独立SDK管理器已删除.您必须转到"SDK工具"标签.

As of the latest version of Android Studio the Standalone SDK Manager is removed. You must go to the SDK Tools tab.

首先,打开Android Studio,然后单击顶部工具栏上的此图标:

First off, open Android Studio and click this icon at the top toolbar:

然后,在对话框启动时,单击对话框左下方的启动独立SDK管理器":

Then, when the dialog launches, click "Launch Standalone SDK Manager" at the bottom left of the dialog:

要确保没有其他任何东西需要更新/安装,请单击取消全选":

To make sure nothing other than what we want gets updated/installed, click "Deselect All":

当独立SDK管理器"窗口打开时,查找其他"并将其折叠.您应该看到"Google Play服务"和"Google存储库",在右侧应该看到可用更新:{something}" .选择这些项目,然后单击安装".

When the Standalone SDK Manager window opens, look for "Extras" and collapse it. You should see "Google Play Services" and "Google Repository" and on the right you should see "Update Available: {something}". Select these to items and click "Install".

完成安装后,错误将消失.

When they're done installing, the error will go away.

这篇关于无法更新Firebase依赖项(com.google.firebase)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆