resove com.google.firebase:firebase-core:16.0.3中显示的错误

时间:2018-09-04 14:28:12

标签: android firebase android-studio

click here to check exact error which i am getting

 buildscript {

repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath 'com.google.gms:google-services:4.0.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}
allprojects {
    repositories {
        google()
        jcenter()
    }
}


task clean(type: Delete) {
    delete rootProject.buildDir
}

这是我在项目级别的build.gradel 您可以检查图片链接的确切错误,这将反映我的问题。 every thing which is needed for upgradation is already over yyou can check this by clicking here i have provided one screenshot for that

过去几天我一直在抓狂。请帮助我

2 个答案:

答案 0 :(得分:1)

错误是(根据图片):

  

无法解决:com.google.firebase:firebase-database:16.0.3

要解决此问题,请为16.0.1使用firebase-database版,因为它是最新版本。

implementation 'com.google.firebase:firebase-database:16.0.1'

您可以检查here以获得最新版本。

答案 1 :(得分:0)

只需以这种方式添加库

implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.google.firebase:firebase-auth:16.0.3'

您必须将指令“ 编译”更改为“ 实现