firebase setup on android

后端 未结 2 1493
Happy的楠姐
Happy的楠姐 2020-12-19 04:30

I can\'t setup the updated version of firebase on android studio. I\'ve created json file of the project on the site firebase and copied it into the project and after coping

2条回答
  •  独厮守ぢ
    2020-12-19 04:57

    Firebase is working based on Google Play Services. So please make sure you have the following sdk tools and they are updated to sync against the library versions of firebase that you are using.

    SDK Tools installed for this project

    Project level build.gradle file

        // Top-level build file where you can add configuration options common to all sub-projects/modules.
    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.1.2'
            classpath 'com.google.gms:google-services:3.0.0'
        }
    }
    
    allprojects {
        repositories {
            jcenter()
        }
    }
    

    Module Level build.gradle file

    apply plugin: 'com.android.application'
    
    android {
        packagingOptions {
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/LICENSE-FIREBASE.txt'
            exclude 'META-INF/NOTICE'
        }
    
        compileSdkVersion 23
        buildToolsVersion "23.0.1"
    
        defaultConfig {
            applicationId "com.devdeeds.firebaseauth"
            minSdkVersion 17
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
            release {
                minifyEnabled true
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.google.firebase:firebase-auth:9.2.0'
        compile 'com.android.support:appcompat-v7:23.3.0'
        compile 'com.android.support:design:23.3.0'
    }
    
    
    apply plugin: 'com.google.gms.google-services'
    

提交回复
热议问题