firebase setup on android

后端 未结 2 1503
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:55

    I had the same problem. If you are using Android studio, you should then update google repository in SDK Manager.

    Following is my build.grade(app)

    apply plugin: 'com.android.application'
    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.3"
        useLibrary 'org.apache.http.legacy'
        defaultConfig {
            applicationId "package name"
            minSdkVersion 15
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
            vectorDrawables.useSupportLibrary = true
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    
    }
    
    dependencies {
        compile 'com.google.firebase:firebase-core:9.0.0'
    }
    apply plugin: 'com.google.gms.google-services'
    

    And this is my build.grade(project)

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.1.0'
            classpath 'com.google.gms:google-services:3.0.0'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            jcenter()
        }
    }
    

提交回复
热议问题