Android 未能解析:firebase-auth-15.0.0,链接资源失败
我正在尝试将firebase身份验证添加到我的应用程序,但在添加Android 未能解析:firebase-auth-15.0.0,链接资源失败,android,firebase,Android,Firebase,我正在尝试将firebase身份验证添加到我的应用程序,但在添加 implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0' 上面说 未能解析:firebase-auth-15.0.0 我还尝试了实现'com.google.firebase:firebase auth:16.1.0' 然后它说 链接引用失败 在你的根级别构建中。gradle把这个 buildscript { dependencies {
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
上面说
未能解析:firebase-auth-15.0.0
我还尝试了实现'com.google.firebase:firebase auth:16.1.0'
然后它说
链接引用失败
在你的根级别构建中。gradle把这个
buildscript {
dependencies {
classpath 'com.google.gms:google-services:4.2.0' // google-services plugin
}
}
allprojects {
repositories {
google() // Google's Maven repository
}
}
在应用程序级别build.gradle文件的依赖项部分中
implementation 'com.google.firebase:firebase-auth:16.1.0'
除了在
build.gradle
中具有此功能外:
dependencies {
classpath 'com.google.gms:google-services:4.2.0'
}
allprojects {
repositories {
google()
}
}
对于应用程序级别,您必须具有以下build.gradle
:
dependencies {
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-auth:16.1.0'
}
apply plugin: 'com.google.gms.google-services'
同时具有
firebase core
依赖项和firebase auth
非常重要。此外,您必须在Dependences部分下方有谷歌服务的插件
。您可以在Sandan Sermeerado添加您的项目级gradle文件吗您这里有两个版本firebase auth:16.0.1:15.0.0',使用其中一个并在必要时进行更新,Android Studio在您尝试从那里添加Firebase时导入这两个