Ошибка при добавлении GoogleMap - PullRequest
0 голосов
/ 15 мая 2018

Вот мои зависимости:

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.firebase:firebase-client-android:2.5.2'
    implementation 'com.google.firebase:firebase-core:11.6.2'
    implementation 'com.google.firebase:firebase-messaging:11.6.2'

    implementation 'com.google.android.gms:play-services-maps:15.0.1'
}
apply plugin: 'com.google.gms.google-services'

Когда я добавил последнюю реализацию, которая com.google.android.gms:play-services-maps:15.0.1, я получил эту ошибку:

Все библиотеки Firebase должны быть либо вышеили ниже 14.0.0

в чем проблема?

1 Ответ

0 голосов
/ 15 мая 2018

У вас есть два разных 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'
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...