Вы используете очень старую версию, перейдите по следующей ссылке, чтобы узнать, как обновить:
https://firebase.google.com/support/guides/firebase-android
Пример, изменить следующее:
mRef = new Firebase("https://XXXXXX.firebaseio.com/");
в это:
DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();
Также вам необходимо использовать следующее в корневом файле build.gradle:
buildscript {
// ...
dependencies {
// ...
classpath 'com.google.gms:google-services:4.2.0' // google-services plugin
}
}
allprojects {
// ...
repositories {
google() // Google's Maven repository
// ...
}
}
и в файле app / build.gradle:
apply plugin: 'com.android.application'
android {
// ...
}
dependencies {
// ...
implementation 'com.google.firebase:firebase-core:16.0.6'
// Getting a "Could not find" error? Make sure you have
// added the Google maven respository to your root build.gradle
}
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
подробнее здесь:
https://firebase.google.com/docs/android/setup
Версия, которую вы используете, очень старая, она до того, как Google приобрел firebase. Теперь Firebase SDK находится в репозитории Google (google()
).
https://dl.google.com/dl/android/maven2/index.html