Ошибка: тип программы уже существует: com.google.api.client.googleapis.auth.clientlogin.package-info - PullRequest
0 голосов
/ 13 ноября 2018

Я пытаюсь добавить библиотеки для создания клиента YouTube (поиск видео на YouTube и их воспроизведение).Но у меня возникает проблема, когда я добавляю библиотеку: клиентская библиотека YouTube Data API v3 для Java.Я следую этому уроку .
Это ошибка:

Program type already present: com.google.api.client.googleapis.auth.clientlogin.package-info
Message{kind=ERROR, text=Program type already present: com.google.api.client.googleapis.auth.clientlogin.package-info, sources=[Unknown source file], tool name=Optional.of(D8)}

Вот мой build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.and.pd.ytapi"
        minSdkVersion 15
        targetSdkVersion 28
        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(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.github.bumptech.glide:glide:3.7.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.apis:google-api-services-youtube:v3-rev206-1.25.0'
    implementation files('libs/YouTubeAndroidPlayerApi.jar')
    implementation fileTree(dir: 'libs/youtube', include: '*.jar')
    implementation fileTree(dir: 'libs/youtube/libs', include: '*.jar')
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
}

Может кто-нибудь помочь мне?Спасибо!

...