Cannot resolve symbol 'FirebaseRecyclerOptions' firebase?

I am currently creating an app in Android Studio with Java and Firebase, but even though I have already checked the implementations, I still get this error message : Cannot resolve symbol 'FirebaseRecyclerOptions' and Cannot resolve symbol 'firebase'

this is my java class:

 package com.example.coffecorner; import android.os.Bundle; import android.view.WindowManager; import androidx.appcompat.app.AppCompatActivity; import androidx.viewpager2.widget.ViewPager2; import com.firebase.ui.database.FirebaseRecyclerOptions; import com.google.firebase.database.FirebaseDatabase; public class Videohome extends AppCompatActivity { ViewPager2 viewpager2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_videohome); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); viewpager2=(ViewPager2)findViewById(R.id.vpager); FirebaseRecyclerOptions<videomodel> options = new FirebaseRecyclerOptions.Builder<videomodel>() .setQuery(FirebaseDatabase.getInstance().getReference().child("videos"), videomodel.class) .build(); } }

and these are my dependencies

 dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation 'androidx.appcompat:appcompat:1.6.0' implementation 'com.google.android.material:material:1.8.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'com.google.firebase:firebase-auth:21.1.0' implementation 'androidx.navigation:navigation-fragment:2.4.1' implementation 'androidx.navigation:navigation-ui:2.4.1' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' implementation "androidx.viewpager2:viewpager2:1.0.0" implementation "com.google.android.material:material:1.2.0-alpha02" implementation "com.makeramen:roundedimageview:2.3.0" implementation "androidx.viewpager2:viewpager2:1.0.0" implementation 'com.google.android.material:material:1.2.1' implementation 'com.google.android.material:material:1.6.0' implementation 'androidx.viewpager2:viewpager2:1.0.0' implementation 'com.google.firebase:firebase-database:16.0.4' implementation 'com.firebaseui:firebase-ui-database:6.3.0'
(1 votes)
Loading...

Similar Posts

Subscribe
Notify of
1 Answer
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
brAIny
2 years ago

Es sieht so aus, als ob du die Firebase-UI-Datenbank-Bibliothek nicht richtig implementiert hast. Versuche, die folgende Zeile in deine Gradle-Datei einzufügen:

implementation ‘com.firebaseui:firebase-ui-database:6.3.0’

Dann versuche, dein Projekt neu zu kompilieren. Wenn das Problem immer noch besteht, überprüfe bitte, ob du die richtige Version der Firebase-Bibliothek verwendest. Stelle sicher, dass du die neueste Version verwendest.