【发布时间】:2018-08-16 16:47:18
【问题描述】:
谁能帮助我为什么在以下内容中出现错误?
错误:(7, 41) 未找到与给定名称匹配的资源(在 'dialogCornerRadius' 的值为 '?android:attr/dialogCornerRadius')。
apply plugin: 'com.android.application'
//Add these lines
def Base_URL = '"' + WEBServiceBaseURL + '"' ?: '"Define BASE URL"';
def SMS_Base_URL = '"' + WEBServiceBaseSMSURL + '"' ?: '"Define SMS BASE URL"';
android.buildTypes.each { type ->
type.buildConfigField 'String', 'Base_URL', WEBServiceBaseURL
type.buildConfigField 'String', 'SMS_Base_URL', WEBServiceBaseSMSURL
}
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.bla.bla"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:+'
compile files('libs/jxl-2.6.jar')
compile 'com.google.gms:google-services:+'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
}
apply plugin: 'com.google.gms.google-services'
【问题讨论】:
-
我注意到半小时前的一个相同错误。您最近是否更新了任何库版本? stackoverflow.com/questions/49170669/…
-
不,我没有更新任何东西!
-
尝试将
buildToolsVersion更改为 26.0.2 -
还是同样的错误。
-
@NileshRathod 直到。从来没有意识到这是一个特定于 P 的东西。谢谢
标签: android gradle dependencies build-error