skip to Main Content

I use from Android Studio canary version. I want to use Firebase service. For that I should add this line to root build.gradle file.

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

But my build.gradle file is like this image:

enter image description here

How can I add Firebase in Android Studio

2

Answers


  1. The simple way to add Firebase in project Android Studio is

    Click tools > select Firebase
    Click tool > select Firebase

    After that side bar will display and u can select firebase service what you need
    After that side bar will display and u can select firebase service what you need

    Last, u will see step by step to using this firebase service easily
    Last, u will see step by step to using this firebase service easily

    I hope this will be help you
    #CMIIW

    Login or Signup to reply.
  2. You can try to edit your build.gradle to look like this:

    buildscript {
        repositories {
         maven {
                url "https://plugins.gradle.org/m2/"
            }
            mavenCentral()
        }
    dependencies {
            classpath 'com.google.gms:google-services:4.3.8'
        }
    }
    allprojects {
        repositories {
            mavenCentral()
            maven { url 'https://jitpack.io' }
        }
    }
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    

    Of course you can reomove lines that you think isn’t useful. XD

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search