Question

org.gradle.api.resources.ResourceException: Could not get resource in Android Studio 3.2

I tried to sync the gradle and I got this problem. Can anyone help me?

org.gradle.api.resources.ResourceException: Could not get resource 'https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-measurement-connector-impl/17.0.3/firebase-measurement-connector-impl-17.0.3-javadoc.jar'.

and is this problem related to why I cannot connect my app to firebase?

all error that i got

Selvin's edit:

steps to reproduce: create any project android project with dependencies

dependencies {
    implementation 'com.google.firebase:firebase-core:16.0.5'
}

(for me it's compile) gradle 4.6 with:

dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'
    classpath 'com.google.gms:google-services:4.2.0'
}

but spams Build -> Sync log with

Download https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-core/16.0.5/firebase-core-16.0.5-javadoc.jar
Download https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-measurement-connector-impl/17.0.3/firebase-measurement-connector-impl-17.0.3-javadoc.jar

logs if you try to open both URLs they return HTTP 204(No Content)

Question how can I stop gradle from spamming with those messages for every sync?

 48  19839  48
1 Jan 1970

Solution

 2

You need to write this in your app gradle file

classpath 'com.android.tools.build:gradle:3.4.1'


    allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

May be it's work

2019-05-25

Solution

 0

Try this in Build Gradle:

classpath 'com.android.tools.build:gradle:3.0.1'
2020-05-07