Ошибка: исправить конфликт версий (сервисы Google Play) Kotlin - PullRequest
0 голосов
/ 02 июня 2018

Что касается этого SO потока, я знаю, что существуют конфликты версий, но проблема все еще сохраняется после новых версий от Google.

Ошибка: пожалуйста, исправьте конфликт версий либо обновив версию Googleплагин -services (информация о последней версии доступна на https://bintray.com/android/android-tools/com.google.gms.google-services/) или обновлении версии com.google.android.gms до 12.0.1.

My build.gradle (Модуль: приложение)

....
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.google.firebase:firebase-core:11.8.0'
    implementation 'com.google.firebase:firebase-auth:11.6.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'
    compile 'com.google.android.gms:play-services:12.0.1'
}

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

Какие изменения требуются сейчас?

1 Ответ

0 голосов
/ 02 июня 2018

Вы должны использовать implementation вместо compile.

И использовать эти библиотеки Gradle, я уже проверил на своем компьютере.

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.41"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-auth:15.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'
implementation 'com.google.android.gms:play-services:12.0.1'

Также в ProjectУровень build.gradle Добавление репозиториев:

repositories {
maven{
    url "https://maven.google.com"
}
    google()
    jcenter()
}

Проверьте скриншот для лучшего понимания:

enter image description here

...