Я проверил свой файл приложения build.gradle, и это единственные строки, которые в них связаны с firebase.
/***
* Firebase
*/
implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
transitive = true
}
implementation 'com.google.firebase:firebase-ads:15.0.0'
У меня нет библиотеки, использующей firebase, поэтому я не думаю, что может быть проблема с библиотекой, использующей более старую версию.
Проблема в том, что я не могу создать gradle, очистить проект или перестроить проект с новой версией v15 firebase, поскольку она продолжает выдавать ошибку All firebase libraries must be either above or below 14.0.0
Я еще не нашел вопрос в вашем вопросе Но если вам нужна последняя версия офисов Firebys Совместимо с версией 27.0.3.
//Firebase
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.firebaseui:firebase-ui-database:2.0.1'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
Оказывается, я забыл изменить номер версии для com.google.android.gms:play-services-ads, переключил его на 15.0.0, и все заработало.
Вот блог Google, в котором есть дополнительная информация. Анонсирование новой версии SDK в сервисах Google Play и Firebase
Отлично, не осознавал, что существуют дополнительные зависимости от других плагинов игровых сервисов, соответствующие версии плагина firebase.
Удалите это из градиента уровня приложения
implementation 'com.google.android.gms:play-services-maps:15.0.0'
а потом попробуйте эти версии
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'
это сработало для меня ... танкс
Измените на эту работу для меня:
implementation 'com.firebase:geofire-android:2.1.2'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-database:12.0.1'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-auth:12.0.1'
Попробуйте найти что-нибудь выше 14.0.0, например:
implementation 'com.google.android.gms:play-services-location:15.0.0'
и попробуйте изменить его на более старую версию, например
implementation 'com.google.android.gms:play-services-location:12.0.1'
apply plugin: 'com.google.gms.google-services'
поместите его под этой строкой.
apply plugin: 'com.android.application'
у меня это сработало.
это не имеет никакого смысла Но у меня это сработало, спасибо !! спас мой день
спасибо, у меня тоже сработало ... Но я должен спросить гугл: почему?
Например изменить
implementation 'com.google.android.gms:play-services-appindexing:9.8.0'
к
implementation 'com.google.firebase:firebase-appindexing:15.0.1'
, поскольку это предложение содержится в предупреждении в build.gradle.
Для меня сработало изменение com.google.android.gms:play-services-location:15.+ на com.google.android.gms:play-services-location:11.6.2, чтобы это была та же версия, что и моя библиотека com.google.firebase:firebase-messaging:11.6.2.
Изменение произошло в файле platform/android/project.properties.
Библиотека местоположения и push-уведомлений теперь работает отлично
Измените все свои библиотеки firebase на одну и ту же версию.
При изменении версии зависимости google или firebase убедитесь, что вы также обновили совместимую версию в градиенте уровня проекта.
У меня была такая же проблема, и изменение версий решило ее:
compile 'com.google.android.gms:play-services-location:16.0.0'
compile 'com.google.firebase:firebase-core:16.0.5'
compile 'com.google.firebase:firebase-appindexing:16.0.2'
compile 'com.google.android.gms:play-services-maps:16.0.1'
compile 'com.google.android.gms:play-services-places:16.0.1'
compile 'com.google.android.gms:play-services-location:16.0.0'
compile 'com.google.firebase:firebase-auth:16.0.5'
compile 'com.google.firebase:firebase-database:16.0.5'
compile 'com.firebaseui:firebase-ui-database:1.0.1'
compile 'com.google.firebase:firebase-storage:16.0.5'
compile 'com.google.firebase:firebase-messaging:17.3.4'
Надеюсь это поможет
Можете ли вы показать нам свой build.gradle, вы добавили строку плагина apply в нижней части файла, чтобы включить плагин Gradle?