Конфликт библиотеки интеграции с Google Фото - PullRequest
0 голосов
/ 24 декабря 2018

Ошибка: тип программы уже присутствует: com.google.api.AuthProviderOrBuilder

Я сталкиваюсь с вышеуказанной ошибкой после выполнения интеграции с Google Фото и добавления следующих зависимостей в мой проект:

implementation 'com.google.photos.library:google-photos-library-client:1.1.0'
implementation 'com.google.apis:google-api-services-oauth2:v2-rev141-1.25.0'
implementation group: 'com.google.oauth-client', name: 'google-oauth-client-jetty', version: '1.23.0'

Вот полный файл Gradle уровня приложения:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.app.package”
        minSdkVersion 21
        targetSdkVersion 28

        versionCode 1
        versionName “1.0.0”

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
    buildTypes {

        debug {
            debuggable true
        }

        release {
            debuggable false
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    flavorDimensions “appName”
    productFlavors {

        dev {
            dimension “appName”
            applicationId "com.app.package"
            resValue 'string', 'package_name', defaultConfig.applicationId
        }

        prod {
            dimension "appName"
            resValue 'string', 'package_name', defaultConfig.applicationId
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
    }
}

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

    implementation 'com.android.support:appcompat-v7:28.0.0'

    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:customtabs:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:support-vector-drawable:28.0.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'

    // for fused location provider - to get the last known location
    implementation 'com.google.android.gms:play-services-places:16.0.0'
    implementation 'com.google.android.gms:play-services-basement:16.0.1'

    implementation 'com.google.android.gms:play-services-maps:16.0.0'
    implementation 'com.google.android.gms:play-services-awareness:16.0.0'

    // firebase
    implementation 'com.google.firebase:firebase-core:16.0.4'
    implementation 'com.google.firebase:firebase-firestore:17.1.1'
    implementation 'com.google.firebase:firebase-storage:16.0.3'
    implementation 'com.google.firebase:firebase-auth:16.0.2'
    implementation 'com.google.firebase:firebase-crash:16.2.1'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'
    implementation 'com.firebaseui:firebase-ui-auth:3.1.1'
    implementation 'com.google.firebase:firebase-config:16.0.1'


    // sphericalUtil to calculate distance between in meters
    implementation 'com.google.maps.android:android-maps-utils:0.5'

    // Gson
    implementation 'com.google.code.gson:gson:2.8.5'

    // google directions api
    implementation 'com.google.maps:google-maps-services:0.2.5'

    // for crashlytics
    implementation('com.crashlytics.sdk.android:crashlytics:2.9.3@aar') {
        transitive = true
    }

    //Voice assistant
    implementation 'ai.api:sdk:2.0.7@aar'
    implementation 'ai.api:libai:1.6.12'
    implementation 'commons-io:commons-io:2.6'

    // glide
    implementation 'com.github.bumptech.glide:glide:4.8.0'

    // mapbox
    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.5.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-services:2.1.0'

    //Hashtags helper library
    implementation 'com.github.danylovolokh:hashtag-helper:1.1.0'

    // google-places-api
    implementation 'com.google.android.gms:play-services-places:16.0.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.github.chrisbanes:PhotoView:2.1.4'
    implementation "android.arch.persistence.room:runtime:$rootProject.roomVersion"
    annotationProcessor "android.arch.persistence.room:compiler:$rootProject.roomVersion"

    // RxJava2
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
    implementation 'io.reactivex.rxjava2:rxjava:2.1.2'
    implementation 'android.arch.persistence.room:rxjava2:1.1.1'

    //For Instagram like dots below in a ViewPager
    implementation 'com.github.hrskrs:InstaDotView:1.1'

    //For workManager
    implementation('android.arch.work:work-runtime:1.0.0-alpha10') {
        exclude group: 'com.google.guava', module: 'listenablefuture'
    }

    //Image cropping library
    implementation 'com.github.yalantis:ucrop:2.2.2'

    //Video compressor
    implementation 'com.iceteck.silicompressorr:silicompressor:2.2.1'

    //Firebase deeplink
    implementation 'com.google.firebase:firebase-dynamic-links:16.1.2'
    implementation 'com.google.android.gms:play-services-analytics:16.0.4'
    implementation 'com.makeramen:roundedimageview:2.3.0'

    //Swipe button library
    implementation 'com.ebanx:swipe-button:0.4.0'

    //Google Photos Library
    implementation 'com.google.photos.library:google-photos-library-client:1.1.0'
    implementation 'com.google.apis:google-api-services-oauth2:v2-rev141-1.25.0'
    implementation group: 'com.google.oauth-client', name: 'google-oauth-client-jetty', version: '1.23.0'
}

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

В соответствии с документацией Android здесь Я обнаружил, что это дублирующая ошибка класса, и я сузилв .idea / library, которая может вызывать конфликт, откройте следующие библиотеки:

Gradle__org_threeten_threetenbp_1_3_3_jar.xml
Gradle__io_grpc_grpc_auth_1_10_1_jar.xml.Gradle__com_google_api_gax_grpc_1_29_0_jar.xml
Gradle__com_google_api_api_common_1_6_0_jar.xml

Но если я попытаюсь удалить эти файлы, то после очистки и перестройки проекта * 10 * я получаю * 10 *, а затем снова появляется 10 *, и библиотеки 1021 снова отображаются с ошибкой * 10, а затем появляется 10 *, а затем снова появляется 10 *, а затем появляется ошибка 1021, а затем появляется 10 *, а затем появляется ошибка 1021, а затем снова появляется 10 *, а затем появляется ошибка 1021, а затем выдается 10 * 10 * ошибок, а затем снова появляется 10 *.* Любая помощь будет оценена.Спасибо.

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