Force Gradle to use HTTP instead of HTTPS

前端 未结 4 955
清歌不尽
清歌不尽 2020-12-15 06:00

I am trying to build react-native android app, as a dependecy I see I have gradle, but it fails to load on build. Error message:

* What went wrong:
A problem         


        
4条回答
  •  眼角桃花
    2020-12-15 06:47

    Go into the gradle/wrapper folder nearby and edit the gradle-wrapper.properties

    Then add in a the https to the distribution URL and it should work.

    distributionUrl=https\://services.gradle.org/distributions/gradle-1.10-bin.zip
                        ^
    

    Verify the file you are trying to grab is actually on the repo:

    https://services.gradle.org/distributions/

    Rerun your command to get the gradle wrapper version.

    gradle wrapper
    gradlew.bat wrapper -gradle-version="1.10"
    

    Hope that helps.

提交回复
热议问题