gpt4 book ai didi

java - 错误 : duplicate value for resource 'attr/fontFamily' with config ''

转载 作者:行者123 更新时间:2023-11-30 10:05:28 26 4
gpt4 key购买 nike

在构建项目时我遇到了这个错误Android资源编译失败

Android资源编译失败

E:\Study\Android\Clients Projects\Smupp\Smupp 1.2.1\Smupp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:5397: error: duplicate value for resource 'attr/fontFamily' with config ''. E:\Study\Android\Clients Projects\Smupp\Smupp 1.2.1\Smupp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:5397: error: resource previously defined here.

尝试了所有以前问过的类似问题,但没有帮助。我被困了 4 天。

build.gradle(app)
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.28.0'
}
}

import java.text.SimpleDateFormat

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}

apply plugin: 'com.google.gms.google-services'

android {
dexOptions {
jumboMode true
}
def versionMajor = 1 // 1 - 20000
def versionMinor = 2 // 0 - 9
def versionPatch = 1 // 0 - 99
def buildNumber = 0 // 0 - 999 used for testing builds, excluded from release versionName
def appName = "Smupp"
compileSdkVersion 28
defaultConfig {
applicationId "com.smupp"
minSdkVersion 16
targetSdkVersion 28
versionCode 1201001
versionName "1.2.2"
renderscriptTargetApi 19
renderscriptSupportModeEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
//android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true
resConfigs "en"
/*javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}*/
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

lintOptions {
abortOnError false
}
dexOptions {
javaMaxHeapSize "4g"
}

buildToolsVersion '28.0.3'
}

dependencies {
def supportLibVersion = '1.0.0-beta01'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0-alpha4', {
exclude group: 'com.android.support', module: 'support-annotations'
})

implementation "androidx.appcompat:appcompat:1.0.2"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation "com.google.android.material:material:1.1.0-alpha04"
implementation "androidx.recyclerview:recyclerview:1.1.0-alpha03"
implementation "androidx.percentlayout:percentlayout:1.0.0"
implementation 'com.google.android.material:material:1.0.0'

implementation 'com.google.firebase:firebase-messaging:17.4.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
//implementation "com.google.android.gms:play-services-gcm:16.1.0"

testImplementation 'junit:junit:4.12'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.squareup.okhttp:okhttp:2.7.5'
implementation 'com.jakewharton:butterknife:10.1.0'
implementation 'com.github.johnkil.android-robototextview:robototextview:2.4.3'
implementation 'com.squareup.retrofit:retrofit:1.9.0'
implementation 'com.facebook.android:facebook-android-sdk:4.40.0'
implementation 'com.google.android.exoplayer:exoplayer:r1.5.8'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.googlecode.mp4parser:isoparser:1.1.20'
implementation('com.twitter.sdk.android:twitter:2.2.0@aar') {
transitive = true;
}
}

最佳答案

看见

values\values.xml:5397: error: resource previously defined here.

尝试从 values.xml 重命名 fontFamily 名称。

关于java - 错误 : duplicate value for resource 'attr/fontFamily' with config '' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55254684/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com