android 关键网址收藏,国内镜像下载gradle配置,腾讯站点,阿里云站点下载

Android studio各版本官方下载地址:
https://developer.android.google.cn/studio/archive

Android studio稳定版下载地址:
https://developer.android.google.cn/studio

Android开发中文站点:
https://developer.android.google.cn/

Android studio排错:
http://tools.android.com/build/studio

Android studio插件问题
https://developer.android.google.cn/studio/known-issues

项目构建太慢,加速构建
http://blog.isming.me/2015/03/18/android-build-speed-up/

gradle 下载地址:
https://gradle.org/releases/
https://services.gradle.org/distributions/

gradle下载不下来的话,可以把仓库镜像替换成国内镜像,下载完gradle再换回去Google和jcenter:
在项目文件中找到build.gradle文件,修改其中的buildscript和allprojects地址:

buildscript {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0-alpha13'
    }
}
allprojects {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}

阿里云gradle配置:
https://maven.aliyun.com/mvn/guide

腾讯国内镜像gradle下载点值:
https://mirrors.cloud.tencent.com/gradle/

Google站点:
https://services.gradle.org/distributions/

参考:
https://www.cnblogs.com/luoruiyuan/p/6527995.html

gradle及相关插件Google下载替换为国内镜像下载

修改gradle下载地址,打开gradle-wrapper.properties:

#Fri Feb 19 17:54:57 CST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-5.4.1-all.zip

然后,找到project的build.gradle文件:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        maven{url 'https://mirrors.cloud.tencent.com/gradle/'}
        maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        maven{url "https://jitpack.io"}
        google()
//        google()
//        jcenter()
//        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' }
//        maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
        maven {
            url 'https://maven.aliyun.com/repository/public/'
        }
        maven {
            url 'https://maven.aliyun.com/repository/google'
        }
        maven {
            url 'https://maven.aliyun.com/repository/jcenter'
        }
        maven {
            url 'https://maven.aliyun.com/repository/gradle-plugin'
        }
        mavenLocal()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.2'
        
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        maven{url 'https://mirrors.cloud.tencent.com/gradle/'}
        google()
//        google()
//        jcenter()
//        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' }
//        maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
        maven {
            url 'https://maven.aliyun.com/repository/public/'
        }
        maven {
            url 'https://maven.aliyun.com/repository/google'
        }
        maven {
            url 'https://maven.aliyun.com/repository/jcenter'
        }
        maven {
            url 'https://maven.aliyun.com/repository/gradle-plugin'
        }
        mavenLocal()
        mavenCentral()
    }
}

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

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值