(Android & Firebase) Cannot resolve symbol 'dataSnapshot'
You are seeing that dataSnapshot
in red because there is no such object present in your code. Most likely you should use the snapshot
object that is present as an argument. So please change the following line of code:
music_id = dataSnapshot.getValue("Playlist_Id");
To:
music_id = snapshot.getValue("Playlist_Id");
Cannot resolve symbol 'firebase', even with updated gradle files
It happens because you are using the javascript code and the web implementation in a java class and it can't work.
In your case you have to use the Android implementation, in java or kotlin.
Related Topics
Android/View/View$Onunhandledkeyeventlistener (Onmeasure Error)
Fcm (Firebase Cloud Messaging) How to Send to All Phones
How to Hide App Title in Android
Play-Services-Ads Conflicts with Appcompat
Android Webview Cannot Render Youtube Video Embedded via Iframe
How Surfaceholder Callbacks Are Related to Activity Lifecycle
Using a Broadcast Intent/Broadcast Receiver to Send Messages from a Service to an Activity
What's "Requestcode" Used for on Pendingintent
Addoncompletelistener Not Called Offline with Cloud Firestore
Why Does Calling Getwidth() on a View in Onresume() Return 0
What Is Metadata ? and What Is The Use of It in Android
Getting a JSONexception: End of Input at Character 0
What Is The Easiest Way to Use Svg Images in Android
Android Different Edittext Backgrounds for Different States Using Shapes, Selector or List