0

지원 환경 설정 라이브러리를 포함 할 때까지 프로젝트가 정상적으로 빌드됩니다. 이 오류가 발생하는 이유지원 추가 : preference-v7 또는 -v14 라이브러리로 인해 Gradle 빌드가 실패합니다.

C:\Users\user\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.0.aar\e8afe3ff4b4dc10495266439a3695e57\res\values\values.xml:252:5-69: AAPT: error: duplicate value for resource 'attr/min' with config ''. 

C:\Users\user\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.0.aar\e8afe3ff4b4dc10495266439a3695e57\res\values\values.xml:252:5-69: AAPT: error: resource previously defined here. 

C:\Users\user\StudioProjects\project\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:627: error: duplicate value for resource 'attr/min' with config ''. 

C:\Users\user\StudioProjects\project\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:483: error: resource previously defined here. 

* What went wrong: 
Execution failed for task ':app:mergeDebugResources'. 
> Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details 

난 정말 모르겠어요 ...

편집 :

내가 할, 빌드이 오류와 함께 실패 전체 build.gradle :

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

android { 
    compileSdkVersion 27 

    compileOptions { 
     sourceCompatibility JavaVersion.VERSION_1_8 
     targetCompatibility JavaVersion.VERSION_1_8 
    } 

    defaultConfig { 
     applicationId "com.myapp" 
     minSdkVersion 16 
     targetSdkVersion 27 
     multiDexEnabled true 
     versionCode 1 
     versionName "myVersion" 
     resConfigs "en" 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 

     debug { 
      ext.enableCrashlytics = false 
     } 
    } 
} 

dependencies { 
    implementation fileTree(include: ['*.jar'], dir: 'libs') 

    def firebaseVersion = '11.4.2' 
    def supportVersion = '27.0.0' 

    //Firebase Crashlytics 
    compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
     transitive = true 
    } 

    //Firebase 
    implementation 'com.google.firebase:firebase-auth:' + firebaseVersion 
    implementation 'com.google.firebase:firebase-core:' + firebaseVersion 
    implementation 'com.google.firebase:firebase-firestore:' + firebaseVersion 

    //FirebaseUI 
    implementation 'com.firebaseui:firebase-ui-auth:3.1.0' 

    //Android Support 
    implementation 'com.android.support:support-v4:' + supportVersion 

    implementation 'com.android.support:appcompat-v7:' + supportVersion 
    implementation 'com.android.support:cardview-v7:' + supportVersion 
    implementation 'com.android.support:gridlayout-v7:' + supportVersion 
    implementation 'com.android.support:recyclerview-v7:' + supportVersion 
    implementation 'com.android.support:preference-v7:' + supportVersion 

    implementation 'com.android.support:preference-v14:' + supportVersion 

    implementation 'com.android.support:support-vector-drawable:' + supportVersion 

    implementation 'com.android.support:design:' + supportVersion 

    implementation 'com.android.support.constraint:constraint-layout:1.0.2' 

    implementation 'com.android.support:multidex:1.0.2' 

    //Material About 
    implementation 'com.github.daniel-stoneuk:material-about-library:2.2.3-support26.1.0' //Weird version system 

    //OpenCSV 
    implementation('com.opencsv:opencsv:4.0') { 
     //Transitively requires Apache Commons, which necessitates multidex... 
     exclude group: 'commons-beanutils' 
    } 

    //Gson 
    implementation 'com.google.code.gson:gson:2.8.2' 
} 

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

더 자세한 정보가 필요하므로 문제를 자세히 설명해 드리겠습니다. AppCompat Preference 라이브러리를 사용하고 싶지만 처음 build.gradle에 추가하려고 할 때마다 오류가 발생합니다.

+0

당신의 gradle에 중복 파일이나 종속 항목이 있습니다. –

+0

이 (가) 당신을 도울 수 있도록 당신의 애플리케이션 gradle을 – Bek

+0

에 추가했습니다. – 19lmyers

답변

1

파일> 캐시 무효화/재시작으로 이동할 수 있습니다. 이것은 프로젝트에 어떤 잘못이라도 무효화 할 것입니다. 도움이되는지 저에게 알려주십시오!

+0

이것은 문제를 해결하지 못했습니다. : – 19lmyers

+0

build.gradle 파일을 첨부 할 수 있습니까? – charlz

+0

** compileSdkVersion ** 및 ** targetSdkVersion **이 서로 일치하는지 확인하십시오 – charlz

0

이 함께 도서관 정보 자료에서 지원 라이브러리를 제외하려고 할 수 있습니다

implementation ('com.github.daniel-stoneuk:material-about-library:2.2.3-support26.1.0') { 
    exclude group: 'com.android.support' 
    exclude module: 'appcompat-v7' 
    exclude module: 'cardview-v7' 
    exclude module: 'design' 
    } 

의 build.gradle를보고하십시오 :