У вас есть два разных Firebase. Первая , вы используете старую версию Firebase с:
implementation 'com.firebase:firebase-client-android:2.5.2'
Вторая , вы используете более новую версию Firebase:
implementation 'com.google.firebase:firebase-core:11.6.2'
implementation 'com.google.firebase:firebase-messaging:11.6.2'
Итак, вам нужно перенести свою старую базу Firebase.Вы можете сделать это, изменив старую зависимость от Firebase следующим образом:
implementation "com.google.firebase:firebase-database:15.0.0"
Вы должны увидеть полный шаг для перехода со старого Firebase на Обновите приложение Android с Firebase.com
Также вам необходимо использовать одну и ту же версию Firebase и Google Play Service.В конце концов ваши зависимости будут такими:
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.0'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:design:26.1.0'
implementation 'com.koushikdutta.ion:ion:2.2.1'
implementation "com.google.firebase:firebase-database:15.0.0"
implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.0'
implementation 'com.google.android.gms:play-services-maps:15.0.0'
}
apply plugin: 'com.google.gms.google-services'