error: cannot find symbol import com.firebase.ui.database.FirebaseRecyclerAdapter; - android

I have the right library and dependencies the build gradle(app) file. But I'm still etting this error.
According to some answers here, I have already tried all of them. I already checked if i have the right version, whether i have included the package correctly, whether the package name is same in google-service.json file, in manifest file, or in gradle file. I have already done all these.
// All google dependencies
implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'
implementation 'com.google.android.gms:play-services-places:12.0.1'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.firebase:firebase-database:12.0.1'
implementation 'com.google.firebase:firebase-auth:12.0.1'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
implementation 'com.firebaseui:firebase-ui:3.3.0'
implementation 'com.firebase:firebase-client-android:2.5.2'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.android.gms:play-services-gcm:12.0.1'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.github.ar-android:DrawRouteMaps:1.0.0'
these are backdated on purpose.
as this answer(https://stackoverflow.com/a/39217164/11686135) suggests, i have already done that:
import com.firebase.ui.database.FirebaseRecyclerAdapter;
import com.firebase.ui.database.FirebaseRecyclerOptions;
and this is the error its showing: Cannot resolve symbol 'database'
maybe somehow the dependencies not working...?
i am really novice at this. thanks in advance

Perhaps you are missing a dependency, please refer to the
GitHub project for FirebaseUI,
you might be missing just one more dependency such as any of these:
dependencies {
// FirebaseUI for Firebase Realtime Database
implementation 'com.firebaseui:firebase-ui-database:5.0.0'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:5.0.0'
// FirebaseUI for Firebase Auth
implementation 'com.firebaseui:firebase-ui-auth:5.0.0'
// FirebaseUI for Cloud Storage
implementation 'com.firebaseui:firebase-ui-storage:5.0.0'
}

if someone is getting same issue then try searching for Firebase Dependencies latest version
and add it issue will be resolved
These are Latest dependencies add accordingly for use
To learn more
click here
dependencies {
// FirebaseUI for Firebase Realtime Database
implementation 'com.firebaseui:firebase-ui-database:6.3.0'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:6.3.0'
// FirebaseUI for Firebase Auth
implementation 'com.firebaseui:firebase-ui-auth:6.3.0'
// FirebaseUI for Cloud Storage
implementation 'com.firebaseui:firebase-ui-storage:6.3.0'
}

Firebaserecycleroption.
Basically android studio will change their version.
but build.gradle old dependencies are working in new version. So guys try to all dependecies in gradle.
gradle build dependencies:
compile 'com.firebaseui:firebase-ui-database:2.0.0'
implementation 'com.firebaseui:firebase-ui-database:4.3.2'
implementation 'com.firebaseui:firebase-ui-firestore:4.3.1'
implementation 'com.firebaseui:firebase-ui-database:5.0.0'
implementation 'com.firebaseui:firebase-ui-database:6.3.0'
//( Below two dependencies are same apply both )
compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile'com.firebaseui:firebase-ui-database:1.1.1'
implementation 'com.firebaseui:firebase-ui-database:8.0.1'
( must try it )

Related

Android Gradle Libraries Conflict

I'm trying to implement Firebase dynamic links in an application that already uses Firebase, but once I added the needed libraries for dynamic links I started receiving this error:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[19.0.
2]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
these are the old dependencies related to Firebase that were previously used in the app:
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.google.firebase:firebase-core:17.2.1'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.firebase:firebase-ml-vision:24.0.1'
and these are the new ones I'm trying to add:
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:26.0.0')
// Declare the dependencies for the Dynamic Links and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-dynamic-links-ktx'
implementation 'com.google.firebase:firebase-analytics-ktx'
I'm not sure which dependency the error is referring to that need to be updated.
If you're going to use the Firebase BoM:
implementation platform('com.google.firebase:firebase-bom:26.0.0')
you should specify all of your Firebase depedencies without version numbers, and let the BoM assign them, so that they are all compatible with each other. This means stripping off the version numbers for the dependencies you added for FCM and others:
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-database'
implementation 'com.google.firebase:firebase-core'
implementation 'com.google.firebase:firebase-ml-vision'
I don't know about 'com.google.android.gms:play-services-auth:17.0.0' - you might have to make sure that one is manually up to date to the latest version.

ERROR: Failed to resolve: com.google.firebase:firebase-messaging:19.2.0 [duplicate]

This question already has an answer here:
How to fix "manifest merger error" due to the Firebase Database implementation
(1 answer)
Closed 3 years ago.
implementation 'com.google.firebase:firebase-messaging:19.2.0'
implementation 'com.firebaseui:firebase-ui-database:2.1.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'frankiesardo:icepick:3.2.0'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.jakewharton:butterknife:10.2.1'
implementation 'com.zsoltsafrany:needle:1.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
compileOnly 'frankiesardo:icepick-processor:3.2.0'
implementation 'joda-time:joda-time:2.10.5'
testImplementation 'junit:junit:4.13
this is my build.gradle code
i have attched the image of my code and therror am getting pls help me with resolveing this error
Update the dependency to the following:
implementation 'com.google.firebase:firebase-messaging:20.1.0'
Also it seems you are using the android support libraries. But the newest version of firebase support androidx and not com.android.support. Therefore you need to do the following:
The updated libraries will not work unless you make the following changes in your app:
- Upgrade com.android.tools.build:gradle to v3.2.1 or later.
- Upgrade compileSdkVersion to 28 or later.
- Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.
Check the following for more info:
https://developer.android.com/jetpack/androidx/migrate
https://firebase.google.com/support/release-notes/android#2019-06-17
There is no Firebase Cloud Messaging Library with Version 19.2.0
Change it to :
com.google.firebase:firebase-messaging:20.1.0
If you don't want to migrate with android x just try using :
Versions before 17 June. I don't recommand this as solution.
Please Read on this you will find Release Notes.

Firebase version update issue

I'm trying to update my firebase id & firebase messaging version but it gives me error
implementation "com.google.firebase:firebase-core:17.0.0"
implementation "com.google.firebase:firebase-iid:17.0.2"
implementation "com.google.firebase:firebase-messaging:17.0.0"
implementation "com.google.android.gms:play-services-places:17.0.0"
implementation "com.google.android.gms:play-services-location:17.0.0"
implementation "com.google.android.gms:play-services-maps:17.0.0"
Dependency failing: com.google.firebase:firebase-messaging:17.0.0 -> com.google.firebase:firebase-iid#[16.0.0], but fire
base-iid version was 19.0.0.
Also giving following errors:
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'mifosng' depends on project 'debugCompileClasspath' which depends onto com.google.firebase:firebase-analytic
s#17.0.0
-- Project 'mifosng' depends on project 'debugCompileClasspath' which depends onto com.google.firebase:firebase-core#17.
0.0
-- Project 'mifosng' depends on project 'debugCompileClasspath' which depends onto com.google.firebase:firebase-messagin
g#17.0.0
This happened to me before, You need to add/enable AndroidX in your project
Do not forget to add these in your Project properties:
android.useAndroidX=true
android.enableJetifier=true
This work for me :
implementation 'com.google.firebase:firebase-iid:19.0.1'
implementation 'com.google.firebase:firebase-core:17.0.1'
implementation 'com.google.firebase:firebase-database:18.0.0'
implementation 'com.google.firebase:firebase-auth:18.1.0'
implementation 'com.google.firebase:firebase-messaging:19.0.1'
And
classpath 'com.google.gms:google-services:4.3.0'
in dependencies of the top level build.gradle
You dont need to add:
implementation "com.google.firebase:firebase-iid:17.0.2"
As it is a transitive dependency used in firebase-messaging which means firebase-messaging already uses it. So just remove implementation "com.google.firebase:firebase-iid:17.0.2" from your build.gradle file.

Unresolved reference "Searcher"

Trying to integrate instant search in my Android app, but "Searcher" is unresolved.
I have the following dependencies currently, am I missing any?
implementation "com.algolia:algoliasearch-android:3.27.0"
implementation "com.algolia:algoliasearch-client-kotlin-jvm:1.0.0"
implementation 'com.algolia:instantsearch-androidx:1.15.2'
implementation "io.ktor:ktor-client-android:1.2.2"
include core dependency also
implementation 'com.algolia:instantsearch-androidx-core:1.15.2'
The latest release of instantsearch-androidx is lacking its transitive dependencies. The issue was reported on GitHub, you can follow its progress there - likely a new version will soon be released with the appropriate dependencies packaged.
As a workaround, you can add the dependencies yourself to your application - depending on the InstantSearch features you use, you might need some or all of the following:
implementation "com.algolia:instantsearch-androidx:$VERSION_INSTANTSEARCH"
implementation "com.algolia:instantsearch-androidx-core:$VERSION_INSTANTSEARCH"
implementation 'com.algolia:algoliasearch-android:3.27.0'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.github.bumptech.glide:glide:4.7.1'

Cannot resolve symbol 'FirebaseAuth'

Why am I getting this error? My repository and Google play services are up to date and I've used all the requires steps for using Firebase like copying firebase code in both build.gradle(Project and app). The intellisence doesn't even show FirebaseAuth but displays other members of Firebase.
Solved the error by adding this to the build.gradle file(for app) -
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
The 2nd dependency is to solve the version conflict error.
Add this dependency to Gradle.Build(Module:App)
compile "com.google.firebase:firebase-auth:9.0.2"
then sync with gradle :)
Add these two dependencies into your build.gradle
as 'compile' is replaced by 'implementation'
dependencies {
implementation 'com.google.firebase:firebase-auth:16.0.4'
implementation "com.google.android.gms:play-services-gcm:16.0.0"
}
***For the latest android studio version 3.0 and new ones ***
Same problem. Clean your project with "Build"->"Clean Project".
add the following to the build.gradle (app)
implementation 'com.google.firebase:firebase-auth:9.2.1'
For me this worked with all the firebase extensions:
eg.:
Android studio adds the following line to your gradle file:
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
You have to change it to:
implementation 'com.google.firebase:firebase-auth:16.0.1'
and add:
kapt 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
I have android studio 3.3.1 installed. Compile is replaced with implementation. So you have to write
implementation 'com.google.firebase:firebase-auth:16.1.0'
You should replace version according to the warning you get.
on dependencies in app gradle
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
this is useful android 3.0 and onwards versions auth:16.0.1 and
core:16.0.1Firebase will work
Solved the error by adding this to the build.gradle file(for app) -
compile 'com.google.firebase:firebase-auth:9.2.1'
compile "com.google.android.gms:play-services-gcm:9.2.1"
You may need to make sure that your activity is importing the Firebase Auth module. In your .java file (eg. Login.java):
import com.google.firebase.auth.FirebaseAuth;
Please add the below line in your build.gradle file:
implementation 'com.google.firebase:firebase-auth:19.3.0'
implementation "com.google.android.gms:play-services-gcm:10.2.1"
In my case, I was using firebase-auth and firebase-messaging with different versions. So After getting an error I kept the same version for both e.g.
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
After sync, my problem was solved. try to keep the version the same for firebase libraries
implementation 'com.google.firebase:firebase-auth:16.0.1'
make sure your firebase and all the dependency are the same versions.

Categories

Resources