Reputation: 531
I'm trying to get the Android P preview setup, and in the process I am upgrading all my dependencies, but it gets mad when Firebase and Google Play Services don't match versions. (It wont build). The latest version of Google Play Services is 15.0.1 as denoted here. The latest version of Firebase is version 16.0.0, according to this page. So I figured I should use 15.0.1 for all of them. However Android Studio can't seem to resolve any version of Firebase. It always gives me an error like this:
It gives the same error for any version I give it.
Here are my dependencies:
implementation 'com.google.firebase:firebase-core:15.0.1'
implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.google.android.gms:play-services-base:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'
Upvotes: 1
Views: 646
Reputation: 3293
The firebase-core
library wasn't released at version 15.0.1. You can see via http://maven.google.com that you should use either 15.0.2 or 16.0.0 (my suggestion is to always use 16+ libraries when they exist b/c we're removing version ranges from the POM files (therefore, you'll go back to hermetic builds). The May 23rd entry of our release notes goes into more details, if needed. (https://developers.google.com/android/guides/releases)
The assumption that all of the libraries should be used at the same version is no longer valid as of versions 15.0.0 and greater. Libraries will continue to release independently and with ever-diverging version numbers (following a SemVer.org scheme).
Upvotes: 0
Reputation: 1777
Try to update firebase like below:
implementation 'com.google.firebase:firebase-core:16.0.0'
Also make sure that you use latest google service:
classpath 'com.google.gms:google-services:4.0.1'
Upvotes: 2
Reputation: 6245
From docs you are linked to you can find annotation
// Getting a "Could not find" error? Make sure you have
// added the Google maven respository to your root build.gradle
allprojects {
// ...
repositories {
// ...
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
Upvotes: 0