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.
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
Post a Comment