Programing

오류 : com.google.gms : google-services : 4.2.0을 찾을 수 없습니다.

lottogame 2020. 12. 9. 07:41
반응형

오류 : com.google.gms : google-services : 4.2.0을 찾을 수 없습니다.


오늘 com.google.gms : google-services를 4.1.0에서 4.2.0으로 업데이트하려고했습니다. 최신 버전이고 firebase에서 권장 합니다. 하지만이 오류가 발생합니다.

Could not find com.google.gms:google-services:4.2.0.
Searched in the following locations:
    https://jcenter.bintray.com/com/google/gms/google-services/4.2.0/google-services-4.2.0.pom
    https://jcenter.bintray.com/com/google/gms/google-services/4.2.0/google-services-4.2.0.jar
    https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.2.0/google-services-4.2.0.pom
    https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.2.0/google-services-4.2.0.jar
    https://maven.fabric.io/public/com/google/gms/google-services/4.2.0/google-services-4.2.0.pom
    https://maven.fabric.io/public/com/google/gms/google-services/4.2.0/google-services-4.2.0.jar
Required by:
    project :

그리고 여기 내 프로젝트의 빌드 gradle이 있습니다.

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
        google()
        maven {
            url 'https://maven.fabric.io/public'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.2.0'

        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        // These docs use an open ended version so that our plugin
        // can be updated quickly in response to Android tooling updates

        // We recommend changing it to the latest version from our changelog:
        // https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
        classpath 'io.fabric.tools:gradle:1.27.0'
    }
}

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

최신 정보:

Doug Stevenson이 말했듯이 종속성이 이제 작동 중이므로 저장소에서 google ()을 사용하십시오.

다른 Google 저장소 (firebase, exoplayer)에 문제가있는 경우 여기 에서 문제 진행 상황을 추적 할 수 있습니다 .


google-services : 4.2.0은 Central Repository에서 사용할 수 없으므로 Android Tools Repository에서 다운로드해야합니다. 이것을 프로젝트에 추가하려면

maven { url 'https://dl.bintray.com/android/android-tools' }

이것은 buildscript 저장소에 있습니다. 자세한 내용은 https://mvnrepository.com/artifact/com.google.gms/google-services/4.2.0참조하세요.

buildscript {
    repositories {
        jcenter()
        google()
        maven {
            url 'https://maven.fabric.io/public'
        }
        //  Add this to your project 
        maven { url 'https://dl.bintray.com/android/android-tools' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.2.0'

        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
        // These docs use an open ended version so that our plugin
        // can be updated quickly in response to Android tooling updates

        // We recommend changing it to the latest version from our changelog:
        // https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
        classpath 'io.fabric.tools:gradle:1.27.0'
    }
}

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

Monday December 10 2018, 1:30PM PST

The Google Play services plugin, the Firebase Performance monitoring plug, exoplayer, and possible other dependencies were found to be missing on jCenter. It's not clear why, but some of the teams are known to be moving their build artifacts to the Google maven repo.

As of right now, the Google Play services plugin has been migrated, and should be available through google() in your buildscript for now.


Try this, work for me:

buildscript {
    repositories {
        google()
        //jcenter()
        jcenter {url 'https://dl.bintray.com/android/android-tools'}
        jcenter {url 'https://firebase.bintray.com/gradle'}
        mavenCentral ()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.2.0'
        classpath 'com.google.firebase:firebase-plugins:1.1.5'
    }
}

allprojects {
    repositories {
        google()
        //jcenter()
        jcenter {url 'https://dl.bintray.com/android/android-tools'}
        jcenter {url 'https://firebase.bintray.com/gradle'}
        mavenCentral ()

    }
}

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

google-services:4.2.0 is now back on google maven repository, just sync gradle with default config:

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

참고URL : https://stackoverflow.com/questions/53706565/error-could-not-find-com-google-gmsgoogle-services4-2-0

반응형