![](/img/trans.png)
[英]What is the difference between Sync project with gradle files and Sync with File System?
[英]What is the difference between google() and mavenCentral() in project level gradle file in an android project?
在項目級別,android 項目的Gradle 文件在存儲庫塊中包含google()和mavenCentral() 。
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.0"
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我已經閱讀了相關的答案Difference between google() and maven { url 'https://maven.google.com' } ,但它沒有描述mavenCentral() 。 該答案基於google()作為maven { url 'https://maven.google.com' }的替代品。 但在我的例子中, google()和mavenCentral()都是一起使用的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.