Android

[빌드오류가 발생할때]The specified Gradle distribution ‘https://services.gradle.org/distributions/gradle-4.10.1-all.zip’ does not appear to contain a Gradle distribution.

패브릭을 제거하고 파이어베이스 오류보고 라이브러리로 업데이트 하는 과정에서 오류가 발생하였다.  여러개의 프로젝트를 패브릭 제거후 업데이트하였지만 이번 케이스는 처음발생되었다. 뭐가 꼬였나보지 하는 생각에, 프로젝트 클린을 해보기도 하고 , 안드로이드 스튜디오를 재시작해보기도 하였으나 해결되지않았다. 해결방법은 다음과 같다.

파일 메뉴를 열고, Prjoect Structure..를 클릭한다.


Project Structure창이 열리면, Gradle Version를 4.10.1 이하 다른걸로 변경 해주면 해결된다. 자신에게 발생한 그래들 버전 보다 낮은 버전으로 바꿔서 해주면 끝!! 나는 5.6.4버전으로 변경 후 해결되었다.


 

gradle-wrapper.properties 파일을 열어보면, 5.6.4로 변경되었음을 확인할 수 있다.

#Tue Jul 14 11:48:18 PDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-5.6.4-all.zip

 

어쨌든 해결은 되었다. 그런데 왜 이런 상황이 발생하는걸까?  build.gradle 파일에 설정된 gralde 버전과는 연관성이 없었다.

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    dependencies { 
        classpath 'com.android.tools.build:gradle:3.3.2'
        classpath 'com.google.gms:google-services:4.2.0' 
    }
}

[참고]

https://stackoverflow.com/questions/56161984/the-specified-gradle-distribution-https-services-gradle-org-distributions-gra

 

Leave a Reply

error: Content is protected !!