1
I did the whole process below:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile "com.google.firebase:firebase-database:9.4.0"// banco
compile 'com.google.firebase:firebase-auth:9.4.0' // autenticador
compile 'com.google.firebase:firebase-storage:9.4.0' //arquivos
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services' // esse
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.google.gms:google-services:3.0.0' // esse
}
}
Everything seems to be correct, but I’m not able to declare a Firebase object.
Ex: Firebase novoObjeto;
The class Firebase
is not being imported.
When I start typing Firebase
, appears Firebaseapp
... and so on... not only does it appear Firebase
so I can declare!
It seems to me that the class
Firebase
does not exist. According to doc the class to work with the bank isFirebaseDatabase
. You came to see in some tutorial/ documentation this classFirebase
?– Wakim
I was watching the tutorial below: https://www.youtube.com/watch?v=0sL4PhbN5ws&feature=youtu.be and at minute (4:25) the speaker declares the firebase object. If you can assist me and help me, I’ll be forever grateful.
– Juliano Campos
So this video is very old, which uses the old version of Firebase. I strongly recommend viewing the current documentation, in English: https://firebase.google.com/docs/database/? hl=en
– Wakim