I'm currently upgrading an app to the new Firebase version. I followed the guide, included classpath 'com.google.gms:google-services:3.0.0'
in the dependencies of my project build.gradle as well as compile 'com.google.firebase:firebase-core:9.0.1'
among others in the dependencies of my module build.gradle and also apply plugin: 'com.google.gms.google-services'
at the end of that file.
I get a "cannot resolve symbol 'firebase'" in my imports i.e. import com.google.firebase.database.DatabaseReference;
. Those are not errors that appear when building, so this seems to be working, but they are visible in the code editor of Android Studio.
The imports worked just fine a couple of days ago (except for FirebaseAuth, which was under maintenance). I did not change anything about the code since then (except trying to upgrade to 9.0.2, which lead to the same result). The only thing I did was update some components of the Android SDK, but I can't remember which. The Android SDK as well as Google Repository and Google Play Services are of the newest version. Rebuilding, cleaning and invalidate caches / restart had no effect.
Any ideas how to fix this?
You need to add this dependency in your build.gradle(app)
compile 'com.firebase:firebase-client-android:2.5.0'
Now with New Android Studio ,Its so easy to add Firebase to your Project.
Below are Simple Steps-
Your browser will open with a ‘Request for Permissions’ dialog:
For more on Firebase refer here.
You can open and use the Assistant window in Android Studio by following these steps:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With