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.
Related
currently my sdk version is 29.
I've added firebase imports in gradle and it works fine for the database and firestore.
But when I add the import for the firebase auth I get this error.
One or more issues found when checking AAR metadata values:
Dependency 'androidx.browser:browser:1.4.0' requires 'compileSdkVersion' to be set to 31 or higher.
Compilation target for module ':app' is 'android-29'
I've tried importing with no version (in firebase documentation firebase bom select the version automatic and I've tried setting the version to implementation 'com.google.firebase:firebase-auth:21.0.6' but I get the same error)
Here is a piece of my gradle file:
implementation platform('com.google.firebase:firebase-bom:30.1.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.firebase:firebase-firestore'
implementation 'com.google.firebase:firebase-auth'
The problem is the firebase-auth because if I comment the line of code the app runs fine
Fixed by setting the implementation of firebase bom to the version of 29:
implementation platform('com.google.firebase:firebase-bom:29.3.1')
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.
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'
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 )
i'm learning Android while doing some work on it. I'm trying to update an app's version to Android 8.0, that includes sdk, libraries and external APIs used.
I looked it up and it seems like 15.0.1 is the suggested version. But when i use it, gradle fails for play-services-analytics and firebase services to sync saying it cannot resolve the library and nor can it find the Repository if i press Install Repository.
So currently i'm using version 12.0.1 for both play services and firebase services. Using it like:
implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation 'com.google.android.gms:play-services-analytics:12.0.1'
implementation 'com.google.android.gms:play-services-ads:12.0.1'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.android.gms:play-services-gcm:12.0.1'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-analytics:12.0.1'
implementation 'com.google.firebase:firebase-crash:12.0.1'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
But if i try to use only the play-services 15.0.1 except for analytics then it gives me another warning that using different versions of play services and firebase services can lead to runtime crashes.
So it puts me in a weird situation, i've googled and searched, but cant find anything that works for me... What would be the correct way to deal with this here? Should i settle for 12.0.1? or update what ever works? (Previously the version was 9.4.0 or something along that line; before i was doing the Android 8.0 upgrade)
EDIT: These are my top level gradle dependencies
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.2'
You cannot mix versions of firebase and google play services that are less than or equal to 12 with versions that are greater than or equal to 15.
Therefore you need to update the version number of all these libraries:
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-analytics:15.0.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-analytics:16.0.1'
implementation 'com.google.firebase:firebase-crash:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
Check this:
https://firebase.google.com/support/release-notes/android
https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html
Beginning with version 15, each Maven dependency matching com.google.android.gms:play-services-* and com.google.firebase:firebase-* is no longer required to have the same version number in order to work correctly at build time and at run time.
Also use the following google play services plugin in the top level gradle file:
classpath 'com.google.gms:google-services:4.0.1'