当将firebase项目从旧域升级到新的谷歌firebase域时,我得到以下错误。

未能解决:com.google.firebase:firebase-core:9.0.0

我遵循了Firebase文档中提到的步骤,在“将Firebase添加到您的Android项目”主题中,可用库。

解决此错误的选项是什么?


当前回答

面对我自己,在评论中看到过几次类似的问题-即使安装了“最新”谷歌播放服务和谷歌存储库仍然有同样的问题。

问题是,它们可能是当前Android SDK工具版本的最新版本,但不是应用构建所需的最新版本。

In such case make sure to install latest version of Android SDK Tools first, and probably Android SDK Platform-tools (both under Tools branch). Also please note you may need to go through this several times if you haven't updated for a long time (i.e. install latest Android SDK Tools and Android SDK Platform-tools, then restart Android SDK Manager, then repeat), since the updates seem to be going through some critical mandatory milestones and you cannot install the very latest if you currently have the revision which is pretty "old".

其他回答

如果您想将firebase添加到项目中,以下是先决条件。

要使用Firebase,您应该安装Android Studio 1.5或更高版本。 通过Android SDK管理器下载最新的谷歌播放服务SDK。 设备应运行Android 2.3 (Gingerbread)或更新版本,谷歌Play服务9.2.0或更新版本。

我经过几个小时的挣扎才知道这一切。

来源:添加Firebase到你的Android应用程序

面对我自己,在评论中看到过几次类似的问题-即使安装了“最新”谷歌播放服务和谷歌存储库仍然有同样的问题。

问题是,它们可能是当前Android SDK工具版本的最新版本,但不是应用构建所需的最新版本。

In such case make sure to install latest version of Android SDK Tools first, and probably Android SDK Platform-tools (both under Tools branch). Also please note you may need to go through this several times if you haven't updated for a long time (i.e. install latest Android SDK Tools and Android SDK Platform-tools, then restart Android SDK Manager, then repeat), since the updates seem to be going through some critical mandatory milestones and you cannot install the very latest if you currently have the revision which is pretty "old".

以上都试过了,使用Firebase助手吧!这是最简单的解决方法。首先删除添加到构建中的所有依赖项。gradle(使用手动方法),然后在Android Studio中:

Click Tools > Firebase to open the Assistant window.

真的就这么简单。

需要更新

Android SDK: SDK工具->支持资源库->谷歌资源库

更新Android SDK后,需要同步gradle构建在Android工作室。

进入Android SDK管理器,安装以下两个库的最新版本

谷歌播放服务 谷歌库