2

I am facing a problem to compile Firebase in my android project.Here is my app level gradle:

apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "24.0.3" defaultConfig { applicationId "<my_app_id>" minSdkVersion 15 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:25.1.0' compile 'com.android.support:support-v4:25.1.0' compile 'com.google.android.gms:play-services-auth:10.0.1' compile 'com.android.support:design:23.0.1' compile 'com.github.bumptech.glide:glide:3.7.0' compile 'me.relex:circleindicator:1.2.2@aar' compile 'com.android.support:recyclerview-v7:25.1.0' compile 'com.google.firebase:firebase-core:10.2.1' testCompile 'junit:junit:4.12' } apply plugin: 'com.google.gms.google-services' 

And here is the build gradle:

 buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' 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() } } task clean(type: Delete) { delete rootProject.buildDir } 

I am getting an error of Failed to resolve : com.google.firebase:firebase-core:10.2.1

3 Answers 3

2

If you are using android studio,

Goto tools -> Firebase

And follow on screen instructions. Android studio take care of the dependency issues.

Sign up to request clarification or add additional context in comments.

Comments

0

Change

compile 'com.google.android.gms:play-services-auth:10.2.1' 

to

compile 'com.google.android.gms:play-services-auth:10.0.1' 

It works for me.

Comments

0

update your play service version and also update firebase dependency version.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.