无法上外网又需要同步Gradle
生活随笔
收集整理的這篇文章主要介紹了
无法上外网又需要同步Gradle
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
如果你只能上國內的網站,然后你又需要sync gradle,那你需要在build.gradle文件中加入下面的四個maven{}部分的內容,再sync就能成功。
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript {repositories {//這里添加兩個maven{}maven {url "https://maven.aliyun.com/repository/jcenter"}maven {url "https://maven.aliyun.com/repository/google"}google()jcenter()}dependencies {classpath "com.android.tools.build:gradle:4.1.3"// NOTE: Do not place your application dependencies here; they belong// in the individual module build.gradle files} }allprojects {repositories {//這里添加兩個maven{}maven {url "https://maven.aliyun.com/repository/jcenter"}maven {url "https://maven.aliyun.com/repository/google"}google()jcenter()} }task clean(type: Delete) {delete rootProject.buildDir }總結
以上是生活随笔為你收集整理的无法上外网又需要同步Gradle的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 收藏的电脑壁纸
- 下一篇: Introduction to Auto