After updating Gradle dependencies failed to resolve

android gradle dependencies
gradle unable to resolve dependency intellij
update gradle
update gradle wrapper
gradle versions
build.gradle unable to resolve dependency
gradle in android studio
update gradle intellij

After update gradle to latest dependencies contain firebase and play services:

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.

It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Failed to resolve: play-services-base Open File

Failed to resolve: play-services-tasks Open File

Failed to resolve: play-services-stats Open File

Failed to resolve: play-services-ads-identifier Open File

Failed to resolve: play-services-basement Open File

build.gradle(app)

implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.android.gms:play-services-analytics:16.0.0'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'

How can I resolve?

I resolved issue. This is solution

1.add google() before jcenter()
2.exclude group:"com.google.android.gms" in facebook sdk dependencies

My code Gradle :

buildscript {
repositories {
    google()
    jcenter()
}

// something here ...

dependencies {
    classpath 'com.android.tools.build:gradle:3.1.3'
    classpath "io.realm:realm-gradle-plugin:3.1.1"
    classpath 'com.google.gms:google-services:4.0.1'
}
}

allprojects {
repositories {
    google()
    jcenter()
}
}

task clean(type: Delete) {
   delete rootProject.buildDir
}

And Myapp/gradle :

repositories {
   maven { url 'https://maven.fabric.io/public' }
   google()
   jcenter()
}

dependencies {
implementation('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {
    transitive = true
}

implementation ('com.facebook.android:account-kit-sdk:4.28.0'){
    exclude group:"com.google.android.gms"
}
implementation 'com.facebook.android:facebook-android-sdk:4.32.0'

implementation 'com.googlecode.libphonenumber:libphonenumber:8.9.4'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.2'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'

implementation 'com.android.support:multidex:1.0.3'
implementation files('libs/glide-3.8.0.jar')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation('com.squareup.okhttp:okhttp-urlconnection:2.3.0') {
    exclude group: 'com.squareup.okhttp', module: 'okhttp'
}
implementation('com.squareup.okhttp:okhttp:2.3.0') {
    exclude group: 'com.squareup.okio', module: 'okio'
}
implementation 'me.relex:circleindicator:1.2.2@aar'
implementation 'com.android.support:exifinterface:27.1.1'

implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1'

implementation 'com.google.android.gms:play-services-analytics:16.0.0'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'

}
apply plugin: 'com.google.gms.google-services'

android, After update gradle to latest dependencies contain firebase and play services: Configuration 'compile' is obsolete and has been replaced with 'implementation'  Any tips on what I need to do to make Eclipse see the new dependencies in my build.gradle? I tried doing a clean but that does not work. My gradle plugin is: Gradle IDE 3.3.0.201307040643-RELEASE org.springsource.ide.eclipse.gradle.feature.feature.group GoPivotal, Inc.

I have the same problem and resolved by this:

In Gradle (project), just change the position of google() before jcenter(), and Sync and the error is gone.

repositories {
    google()
    jcenter()
}

Gradle fails to resolve dependencies - Help/Discuss, Gradle fails to resolve dependencies If there is a proxy specified, the team {​artifact server/proxy/Gradle} fail to deliver updated contents. I found the answer. I changed the versions of gradle plugins.I am adding my Gradle files below. Project Level // Top-level build file where you can add configuration options common to all sub-projects/modules.

How can I force gradle to redownload dependencies?, Separation of compile and runtime dependencies when consuming POMs found in the gradlePluginPortal() repository has no Maven POM it will fail to resolve. Whenever Gradle tries to resolve a module from a Maven or Ivy repository, it looks for a metadata file and the default artifact file, a JAR. The build fails if none of these artifact files can be resolved. Under certain conditions, you might want to tweak the way Gradle resolves artifacts for a dependency.

How to determine the version of Gradle?, Using dependency resolve rules to fail if a rejected version is found in the graph, Upgrade the dependency version if the project dependencies when it is resolved. WIth –refresh-dependencies’ Gradle will always hit the remote server to check for updated artifacts: however, Gradle will avoid downloading a file where the same file already exists in the cache. First Gradle will make a HEAD request and check if the server reports the file as unchanged since last time (if the ‘content-length’ and ‘last-modified’ are unchanged).

Upgrading your build from Gradle 4.x to 5.0, 4.6.1 Integration libraries: okhttp3 Stack trace / gradle console: Failed to resolve: glide Open dependencies { classpath 'com.android.tools.build:gradle:3.1.0' } Hey sjudd, this happened after upgrading Android Studio for  After updating to Android Studio 3.0 , Let’s fix some Gradle issues Hammad Tariq November 11, 2017 May 18, 2018 Hi guys yesterday I received Android Studio 3.0 update and I immediately decided to update my Android Studio from 2.3.1 to 3.0.

Dependency Management, "Unable to resolve dependency" errors when opening Example of new Flutter Plugin project #22614 Update gradle plugin version to 3.2.1 for all packages. #​817 This fails with the same error message as described here. With this new behavior, if a plugin or a transitive dependency of a plugin found in the gradlePluginPortal() repository has no Maven POM it will fail to resolve. Artifacts published to a Maven repository without a POM should be fixed.

Comments
  • simply put it says don't use compile in your gradle file to sync libraries, instead use implements.
  • i used implementation but failed to resolve.
  • can you make sure you are not working on gradle offline mode right
  • yes,i working on online mode
  • can you post logs
  • Was bagging head for almost 2 days. This solution relieved me. Thanks :)