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

查看:36
本文介绍了无法更新 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'       
  }

我在重建项目时遇到错误

I had getting error at the time of Rebuild project

错误:配置项目: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:

然后,当对话框启动时,点击对话框左下角的Launch Standalone SDK Manager":

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":

当 Standalone SDK Manager 窗口打开时,查找Extras"并将其折叠.您应该会看到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天全站免登陆