当前位置: 首页 > news >正文

新版AndroidStudio配置maven阿里云镜像

project下的build.gradle: 

// Top-level build file where you can add configuration options common to all sub-projects/modules.
// 注意jdk版本需要17以上,因为8.1.3的gradle需要jdk17以上
//plugins {
//    id 'com.android.application' version '8.1.3' apply false
//}buildscript {repositories {maven { url 'https://maven.aliyun.com/repository/central' }maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }google()}dependencies {classpath 'com.android.tools.build:gradle:8.1.3'}
}
// 下面这个allprojects不需要,旧版的需要这个
//allprojects {
//    repositories {
//        maven { url 'https://maven.aliyun.com/repository/central' }
//        maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
//        maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
//        maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
//        maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
//        google()
//    }
//}task clean(type: Delete) {delete rootProject.buildDir
}

gradle.properties配置如下:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
# 下面这里改用腾讯的镜像会快很多
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
http://www.lryc.cn/news/281515.html

相关文章:

  • 【OSG案例详细分析与讲解】之十一:【多效果的3D动画】
  • 一道使用LinkedList和Stack解决的算法题
  • 通用外设-W25Q64
  • Spring MVC MVC介绍和入门案例
  • android使用ndk开发
  • 行为型设计模式——模板方法模式
  • 曲面上偏移命令的查找
  • 世邦spon IP网络对讲广播系统任意文件上传漏洞
  • mp4文件全部转换为mp3
  • 深信服技术认证“SCSA-S”划重点:逻辑漏洞
  • Linux grep命令教程:强大的文本搜索工具(附案例详解和注意事项)
  • 网络安全的威胁PPT
  • CUDA驱动深度学习发展 - 技术全解与实战
  • 如何做用户分层和标签体系
  • Vue+Element Ui实现el-table自定义表头下拉选择表头筛选
  • 使用Java连接MongoDB (6.0.12) 报错
  • 数学建模day16-预测模型
  • Vue3响应式系统(一)
  • MStart | MStart开发与学习
  • GoZero微服务个人探索之路(一)Etcd:context deadline exceeded原因探究及解决
  • C语言从入门到实战——结构体与位段
  • java如何修改windows计算机本地日期和时间?
  • flink中的row类型详解
  • 漏洞复现-Yearning front 任意文件读取漏洞(附漏洞检测脚本)
  • K8S中SC、PV、PVC的理解
  • Agisoft Metashape 基于影像的外部点云着色
  • 图解结算平台:准确高效给商户结款
  • 修改和调试 onnx 模型
  • 不同整数的最少数目和单词直接最短距离
  • 【Microsoft Edge】版本 109.0.1518.55 (正式版本) (64 位) 更新失败解决方案