检出git项目到android studio该如何配置

1.修改:D:\code\android\mjlandroid\gradle\wrapper\gradle-wrapper.properties

gradle-wrapper.properties:

#Tue Nov 04 17:10:52 CST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://mirrors.aliyun.com/macports/distfiles/gradle/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

2.D:\code\android\mjlandroid\gradle\libs.versions.toml

libs.versions.toml:

[versions]
agp = "8.7.3"
kotlin = "1.9.24"
coreKtx = "1.10.1"
junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
appcompat = "1.6.1"
material = "1.10.0"
activity = "1.8.0"
constraintlayout = "2.1.4"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin. ", version.ref = "kotlin" }

总结:AndroidStudio、AGP、Gradle、Java、Kotlin版本有对应关系(官方最新)

参考链接:

官网对应地址-https://developer.android.google.cn/build/releases/gradle-plugin?hl=zh-cn

csdn-https://blog.youkuaiyun.com/ys743276112/article/details/141501346?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522109bf4da299acee3ebcd1841330dd4db%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=109bf4da299acee3ebcd1841330dd4db&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-141501346-null-null.142^v102^pc_search_result_base2&utm_term=android%20studio%20agp&spm=1018.2226.3001.4187

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值