我不知道这里是否是正确的地方,请询问以下内容: 我得到这样的构建错误。
Android资源编译失败 错误:资源'attr / fontFamily'的值与config重复 守护程序:AAPT2 aapt2-3.2.0-4818971-linux守护程序#0
org.gradle.api.tasks.TaskExecutionException:任务':app:mergeDebugResources'的执行失败
错误日志:
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027typeface\u0027.","sources":[{"file":"/home/yqlabs/Desktop/SME/sample-core/build/intermediates/packaged_res/debug/values/values.xml","position":
:app:processDebugResources FAILED
FAILURE: Build failed with an exception.
Execution failed for task ':app:processDebugResources'.
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugResources'.
Caused by: org.gradle.tooling.BuildException: Failed to process resources, see aapt output above for details.
Caused by: com.android.ide.common.process.ProcessException: Failed to execute aapt
App Gradle文件:
compileSdkVersion 26
buildToolsVersion '28.0.3'
defaultConfig {
applicationId 'com.abi.sme.a'
minSdkVersion 16
targetSdkVersion 26
versionCode 14//
versionName "4.4"
multiDexEnabled true
lintOptions {
abortOnError false
}
}
dexOptions {
// incremental true
javaMaxHeapSize "4g"
}
productFlavors {
}
packagingOptions {
exclude 'META-INF/NOTICE' // will not include NOTICE file
exclude 'META-INF/LICENSE' // will not include LICENSE file
exclude 'META-INF/notice'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license'
exclude 'META-INF/license.txt'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support:design:26.0.2'
}
项目Gradle文件:这是项目gradle文件。请检查
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter {
url "http://jcenter.bintray.com/"
}
}
}
/*ext {
compileSdkVersion = 23
buildToolsVersion = "23.0.2"
minSdkVersion = 14
targetSdkVersion = 23
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
lintAbortOnError = false
// QuickBlox SDK version
qbSdkVersion = '3.0'
versionName = "3.0"
testRunnerVersion = "0.4.1"
// Dependency versions
playServicesVersion = '9.4.0'
supportV4Version = '23.1.1'
appcompatV7Version = '23.1.1'
recyclerviewV7Version = '23.2.1'
supportAnnotationsVersion = '23.1.1'
designVersion = '23.1.1'
uilVersion = '1.9.0'
glideVersion = '3.6.1'
pullToRefreshVersion = '3.2.3'
stickyListHeaders = '2.7.0'
robotoTextViewVersion = '2.4.3'
stickersVersion = '0.7.3'
crashlyticsVersion = '2.2.2'
}*/
task clean(type: Delete) {
delete rootProject.buildDir
}
谢谢,任何人都可以提供帮助!