Ошибка - тип программы уже присутствует: android.support.compat.R $ color - PullRequest
0 голосов
/ 24 апреля 2019

Когда я строю apk проекта, чем сталкиваюсь с этой проблемой во время gradle. Как исправить эту проблему Тип программы уже присутствует: android.support.compat.R $ color


android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.enigneerbabu.demos"
        minSdkVersion 15
        targetSdkVersion 26
        multiDexEnabled true
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.github.bumptech.glide:glide:4.1.0' // added for glide
    implementation 'com.android.volley:volley:1.1.0' // added for volley api
    implementation 'com.google.code.gson:gson:2.8.2' //added for gson
    implementation 'com.android.support:recyclerview-v7:26.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.android.gms:play-services-auth:16.0.1' // Added for Google Sign In
    implementation 'com.android.support:design:26.1.0' // Added for tablayout
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.google.android.gms:play-services-maps:15.0.1'
    implementation 'com.google.android.gms:play-services-places:15.0.1'


}```

1 Ответ

0 голосов
/ 24 апреля 2019

В соответствии с этой ссылкой здесь у вас может быть дубликат библиотек.

Также попробуйте добавить это к вашему build.gradle

implementation 'com.android.support:support-v4:27.1.1'

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...