如果你使用最新的 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()
}
}
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 下载不下来,就改成了其他版本。注意变化的部分
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)