Обновление FCM Gradle - PullRequest
       9

Обновление FCM Gradle

0 голосов
/ 03 октября 2018

Я не могу обновить

com.google.firebase:firebase-messaging:11.0.4

до

 com.google.firebase:firebase-messaging:17.3.3

11.0.4 работает нормально.classpath 'com.google.gms: google-services: 4.1.0' также добавлено в мои зависимости.

Мой код Gradle

dependencies {
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    testImplementation 'junit:junit:4.12'
    implementation files('libs/volley.jar')
    implementation 'jp.wasabeef:recyclerview-animators:2.2.6'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.loopj.android:android-async-http:1.4.9'
    implementation 'com.android.support:multidex:1.0.1'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.google.apis:google-api-services-youtube:v3-rev181-1.22.0'
    implementation 'com.google.firebase:firebase-core:16.0.3'
    implementation 'com.google.firebase:firebase-messaging:17.3.3'
    //implementation 'com.google.firebase:firebase-ads:11.0.4'
    implementation 'com.google.android.gms:play-services-maps:11.0.4'
    implementation 'com.google.android.gms:play-services-location:11.0.4'
    implementation 'com.squareup.retrofit2:retrofit:2.1.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
    implementation 'com.google.code.gson:gson:2.7'
    implementation 'com.squareup:otto:1.3.8'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
    implementation 'com.loopj.android:android-async-http:1.4.9'
    implementation 'com.jsibbold:zoomage:1.1.0'
}
apply plugin: 'com.google.gms.google-services'

Ответы [ 4 ]

0 голосов
/ 03 октября 2018

обновите библиотеки сервисов Google Play:

implementation "com.google.firebase:firebase-core:16.0.3"
implementation "com.google.firebase:firebase-messaging:17.3.2"
implementation "com.google.android.gms:play-services-base:15.0.1"
implementation "com.google.android.gms:play-services-maps:15.0.1"
implementation "com.google.android.gms:play-services-location:15.0.1"

, поскольку версии 11.0.4 вызовут конфликт.

0 голосов
/ 03 октября 2018

используйте это в вашем файле build.gradle:

configurations.all {
    resolutionStrategy {
        force 'com.google.android.gms:play-services-basement:16.0.1';
    }
}
0 голосов
/ 03 октября 2018

Пожалуйста, убедитесь, что у вас одинаковое имя версии с библиотеками Firebase и Playservice.Поэтому, пожалуйста, замените ваши библиотеки .

    implementation 'com.google.firebase:firebase-core:16.0.3'
    implementation 'com.google.firebase:firebase-messaging:17.3.3'
    implementation 'com.google.firebase:firebase-ads:11.0.4'
    implementation 'com.google.android.gms:play-services-maps:11.0.4'
    implementation 'com.google.android.gms:play-services-location:11.0.4'

на эти строки

    implementation 'com.google.firebase:firebase-core:11.2.0'
    implementation 'com.google.firebase:firebase-messaging:11.2.0'
    implementation 'com.google.firebase:firebase-ads:11.2.0'
    implementation 'com.google.android.gms:play-services:11.2.0'
0 голосов
/ 03 октября 2018

Последняя стабильная доступная версия - com.google.firebase:firebase-messaging:17.3.2.Android Studio должна уведомить вас об этом, когда вы наводите курсор на эту строку.

...