Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to resolve: com.google.firebase:firebase-core:11.2.0

I'm getting multiple "Failed to Resolve" issues when syncing my project. They are all firebase and play-services related. I made sure they are all the same (11.2.0). I've also checked and the latest version for both is 11.2.0. Also, all the other answers to similar questions involve updating Google play services and repository in the SDK Manager but mine is already up to date.

enter image description here

enter image description here

Any idea why I can't sync my project?

EDIT - Current working solution

// 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.3.3'         classpath 'com.google.gms:google-services:3.0.0'         classpath 'com.google.firebase:firebase-plugins:1.0.4'          // NOTE: Do not place your application dependencies here; they belong         // in the individual module build.gradle files     } }  allprojects {     repositories {         jcenter()         maven { url "https://maven.google.com" }      } }  task clean(type: Delete) {     delete rootProject.buildDir } 
like image 564
rigotre Avatar asked Aug 15 '17 15:08

rigotre


People also ask

Is firebase core deprecated?

Deprecated: This module will no longer be available in SDK 48. Learn how to migrate to React Native Firebase. expo-firebase-core provides access to the Firebase configuration and performs initialization of the native Firebase App.

Where do I get firebase credentials?

In the Firebase console, open Settings > Service Accounts. Click Generate New Private Key, then confirm by clicking Generate Key. Securely store the JSON file containing the key. When authorizing via a service account, you have two choices for providing the credentials to your application.

How do I use firebase BoM?

If you want to use the Firebase Android BoM, update the dependencies in your module (app-level) Gradle file (usually app/build. gradle ) to import the BoM platform. You'll also need to remove the versions from each Firebase library dependency line.


1 Answers

Add maven { url "https://maven.google.com" } to your root level build.gradle file

allprojects {     repositories {         jcenter()         maven {             url "https://maven.google.com"         }     } } 
like image 165
Wilik Avatar answered Oct 18 '22 18:10

Wilik