Failed to resolve: com.google.firebase:firebase-core:11.2.0
Add maven { url "https://maven.google.com" }
to your root level build.gradle
file
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
Failed to resolve: com.google.firebase:firebase-messaging:16.0.5
firebase-messaging 16.0.x version seems unavailable, That why we
getting the error"Failed to resolve: com.google.firebase:firebase-messaging:16.0.5"
In order to fix it keep the other 16.0.x versions as it is
and upgrade 17.x.x versions to the latest
code is given below
def Firebase_Auth_Version = "16.0.5"
def Firebase_Messaging_Version = "17.3.4"
implementation "com.google.firebase:firebase-messaging:$Firebase_Messaging_Version"
implementation "com.google.firebase:firebase-auth:$Firebase_Auth_Version"
Error:(26, 13) Failed to resolve: com.google.firebase:firebase-database:11.2.2
Update your studio to 3.0 preview and gradle version to
classpath 'com.android.tools.build:gradle:3.0.0-beta4'
Failed to resolve: com.google.firebase:firebase-core:9.0.0
Update Aug 2017
As of version 11.2.0
Firebase and Google Play services dependencies are available via Google's Maven Repo. You no longer need to use the Android SDK manager to import these dependencies.
In your root build.gradle
file add the repo:
allprojects {
repositories {
// ...
maven { url "https://maven.google.com" }
}
}
If you are using gradle 4.0
or higher you can replace maven { url "https://maven.google.com" }
with just google()
.
The 9.0.0
version of Firebase was built using Google Play services 9.0 and is now available under the new packaging com.google.firebase:*
See Release Notes for Google Play services 9.0
https://developers.google.com/android/guides/releases#may_2016_-_v90
New versions of packages Google Play Services (rev 30) and Google Repository (rev 26) were just released in the SDK manager so it's likely you just need to update.
Downloading Google Play Services and Google Repository
From Android Studio:
- Click
Tools
>Android
>SDK Manager
. - Click into the
SDK Tools
tab. - Select and install
Google Play Services
(rev 30) andGoogle Repository
(rev 26). See the image below. Sync
andBuild
your project.
From IntelliJ IDEA:
As of April 2017, the latest versions of Google Play Services and Repository are listed below.
- Click
Tools
>Android
>SDK Manager
. - Under the
Packages
panel, Look for theExtras
. - Select and install
Google Play Services
(rev 39) andGoogle Repository
(rev 46). See the image below. Perform a gradle project sync
andBuild
your project.
Failed to resolve: com.google.firebase:firebase-database:11.4.2
Update compileSdkVersion
to at least 26. From https://developers.google.com/android/guides/releases,
"When you upgrade your app’s Play services dependencies to 11.2.0 or later, your app’s build.gradle must also be updated to specify a compileSdkVersion of at least 26 (Android O)."
Failed to resolve implementation 'com.google.firebase:firebase-messaging:15.0.2'
Change this:
classpath 'com.google.gms:google-services:3.2.0'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
into this:
classpath 'com.google.gms:google-services:4.0.1'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
Explanation:
Here in this case using firebase-messaging:15.0.2
with google-services:4.0.1
would work, since the most important thing was updating google-services
above 3.2.0
, and that's because google-services:3.3.0
is needed to be able to use the firebase library from version 15.0 and above. You can check this blog post. that explains the changes in versioning of firebase libraries.
But it is still better to update the google-services
plugin to prevent any other errors with other dependencies.
Note:
The versions less than 15.0.0
are in google maven repository, so you can use them in gradle. But, you cannot mix version 15.0.0
with a version less than 15.0.0
and use google play services 4.0.1
, as said in my answer here. That's why it is better to update firebase libraries to the latest versions.
Related Topics
How to Hide Soft Keyboard on Android After Clicking Outside Edittext
How to Disable Mobile Data on Android
Android - Android.View.Inflateexception: Binary Xml File Line #8: Error Inflating Class Fragment
How to Customize Listview Using Baseadapter
Android: Broadcast Receiver for Screen on and Screen Off
Android: Progressdialog.Show() Crashes with Getapplicationcontext
How to Fire Onlistitemclick in Listactivity with Buttons in List
How to Change Spinner Text Size and Text Color
Check If Application Is Installed - Android
Programmatically Switching Off Android Phone
How to Pass a Value from One Activity to Another in Android