Gradle-7.0.3 build.gradle字段有改变
作者:互联网
如果你使用最新的 Gradle-7.0.3
build.gradle文件里 defaultConfig 作用域内个别字段有变化。
defaultConfig {
applicationId "com.example.myapplication"
minSdk 21 //这里
targetSdk 31 //这里
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
还有setting.gradle
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
rootProject.name = "My Application"
include ':app'
对比以往
defaultConfig {
applicationId "com.example.test_webview_demo"
minSdkVersion 15
targetSdkVersion 30
versionCode 1
versionName "1.0"
}
还有Gradle-7.0.3 下载不下来,就改成了其他版本。注意变化的部分
标签:1.0,Gradle,7.0,build,defaultConfig,gradle,applicationId 来源: https://blog.csdn.net/chentaishan/article/details/121319850