意外令牌:
com.android.support:appcompat-v7:25.4.0 @第27行,第20列。
实施'com.android.support:appcompat-v7:25.4.0'
1个错误
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion
defaultConfig {
applicationId "stking.age"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
Implementation 'com.android.support:appcompat-v7:25.4.0'
Implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
}
答案 0 :(得分:1)
buildToolVersion
,例如buildToolsVersion "25.0.2"
Implementation
更改为implementation
完整的gradle文件如下所示。
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "stking.age"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:25.4.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
}
答案 1 :(得分:0)
添加buildToolsVersion '23.0.3'
它应该像这样buildToolsVersion '27.0.3'
并将您的Implementation
更改为implementation