Pao*_*mbo 1 android android-studio android-gradle-plugin
当我将我的项目与 Android Studio 中的 Gradle 文件同步时,出现以下错误:
在 DefaultConfig_Decolated{name=main、dimension=null、minSdkVersion=null、targetSdkVersion=null、renderscriptTargetApi=null、renderscriptSupportModeEnabled=null、renderscriptSupportModeBlasEnabled=null、renderscriptNdkModeEnabled=null、versionCode=null 上找不到参数 [16] 的方法 minSdkersion() 、 versionName=null、applicationId=com.saffru.colombo.giocoepoche、testApplicationId=null、testInstrumentationRunner=null、testInstrumentationRunnerArguments={}、testHandleProfiling=null、testFunctionalTest=null、signingConfig=null、resConfig=null、mBuildConfigFields={}、mResValues ={}、mProguardFiles=[]、mConsumerProguardFiles=[]、mManifestPlaceholders={}、mWearAppUnbundled=null},类型为 com.android.build.gradle.internal.dsl.DefaultConfig。
我尝试更改 minSdkersion 但错误仍然存在。
这是我的 Gradle 模块
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.saffru.colombo.giocoepoche"
minSdkersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.volley:volley:1.1.1'
}
Run Code Online (Sandbox Code Playgroud)
这是我的 Gradle 项目
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
(我的Android Studio版本是3.1.4)
你有
minSdkersion 16
Run Code Online (Sandbox Code Playgroud)
你应该有
minSdkVersion 16
Run Code Online (Sandbox Code Playgroud)
简单的拼写错误(缺少“V”)
| 归档时间: |
|
| 查看次数: |
4370 次 |
| 最近记录: |