firebase setup on android -


i can't setup updated version of firebase on android studio. i've created json file of project on site firebase , copied project , after coping lines in gradle:

buildscript {     // ...     dependencies {         // ...         classpath 'com.google.gms:google-services:3.0.0'     } } apply plugin: 'com.android.application' android {   // ... } dependencies {   compile 'com.google.firebase:firebase-core:9.0.1' } // add @ bottom apply plugin: 'com.google.gms.google-services' 

i following error:

failed resolve: compile 'com.google.firebase:firebase-core:9.0.0'

how can fix it?

i had same problem. if using android studio, should update google repository in sdk manager.

enter image description here

following 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 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: not place application dependencies here; belong         // in individual module build.gradle files     } }  allprojects {     repositories {         jcenter()     } } 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -