Firebase Tutorial 1 Friendly chat Error occurred configuring root project 'android-start'

前端 未结 1 1241
孤独总比滥情好
孤独总比滥情好 2021-01-15 07:54

I am trying to start the Friendly Chat Firebase tutorial. But the gradle build throws an error and I can\'t really give anymore information as I don\'t know where to begin.

相关标签:
1条回答
  • 2021-01-15 08:38

    I think the error is in project.gradle... I explain about it, this dependencie is correct because is inside the project.gradle:

    classpath 'com.google.gms:google-services:3.0.0'
    

    The other dependencie that needs firebase, needs is inside app.gradle:

    apply plugin: 'com.google.gms.google-services'
    

    And the app.gradle needs too this dependence:

    compile 'com.google.firebase:firebase-core:9.6.1'
    

    The finally gradles are these, project.gradle:

    buildscript {
    repositories {
        jcenter()
        mavenLocal()
    }
    dependencies {
        classpath 'com.google.gms:google-services:3.0.0'
        classpath 'com.android.tools.build:gradle:2.0.0'
    
    
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
    }
    
    allprojects {
        repositories {
            jcenter()
            mavenLocal()
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    

    And the app.gradle:

    ...
    
    dependencies {
        compile 'com.google.android.gms:play-services:9.6.1'
        compile 'com.google.firebase:firebase-core:9.6.1'
    }
    
    //At final of the document
    apply plugin: 'com.google.gms.google-services'
    

    Tell me if I can helps you, greetings!

    0 讨论(0)
提交回复
热议问题