我正在Kotlin开发一个应用程序并继续收到错误:
Failed to resolve: firebase-auth-15.0.0`
在尝试同步gradle时.我正在尝试实施谷歌登录功能.
apply plugin: 'com.androID.application'apply plugin: 'kotlin-androID'apply plugin: 'kotlin-android-extensions'apply plugin: 'com.Google.gms.Google-services'androID {compileSdkVersion 28defaultConfig { applicationID "nus.is3261.kotlinapp" minSdkVersion 21 targetSdkVersion 28 versionCode 1 versionname "1.0" testInstrumentationRunner "androID.support.test.runner.AndroIDJUnitRunner"}buildTypes { release { MinifyEnabled false proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.pro' }}}dependencIEs {implementation filetree(dir: 'libs', include: ['*.jar'])implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"implementation 'com.androID.support:appcompat-v7:28.0.0'implementation 'com.androID.support.constraint:constraint-layout:1.1.3'implementation 'com.androID.support:support-v4:28.0.0'implementation 'com.androID.support:design:28.0.0'testImplementation 'junit:junit:4.12'androIDTestImplementation 'com.androID.support.test:runner:1.0.2'androIDTestImplementation 'com.androID.support.test.espresso:espresso-core:3.0.2'implementation 'com.Google.firebase:firebase-auth:16.0.1:15.0.0'}
我已经尝试按照堆栈溢出here的解决方案,但在同步gradle后我发出此警告警告:app gradle文件必须依赖com.Google.firebase:firebase-core才能使Firebase服务按预期工作.
解决方法:
您收到以下错误:
Failed to resolve: firebase-auth-15.0.0
因为您在代码中使用了错误的依赖项.要解决此问题,请更改以下代码行:
implementation 'com.Google.firebase:firebase-auth:16.0.1:15.0.0'
至
implementation 'com.Google.firebase:firebase-auth:16.0.5'
因为这样的版本16.0.1:15.0.0不存在.
还请添加以下依赖项,该依赖项现在是必需的:
implementation 'com.Google.firebase:firebase-core:16.0.4'
Your app gradle file Now has to explicitly List
com.Google.firebase:firebase-core
as a dependency for Firebase services to work as expected.
在您的顶级build.gradle文件中,请务必使用最新版本的Google Service插件:
classpath 'com.Google.gms:Google-services:4.1.0'
总结 以上是内存溢出为你收集整理的将android studio项目与Firebase集成用于google登录功能时的依赖性错误全部内容,希望文章能够帮你解决将android studio项目与Firebase集成用于google登录功能时的依赖性错误所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)