I need to get a hands-on on firebase list and recycler adapters. I've added the required firebase ui dependency but for reasons unknown to me, I keep getting this error:
Failed to resolve: com.firebase:firebase-ui:0.3.1
I've throttled the dependency version back and forth(0.1.0,0.3.1, 0.4.0) and neither of them works for me. I could use some help here.
What is the google play services version of yours.
if 9.8.0, use below for compatibility reasons
compile 'com.firebaseui:firebase-ui:1.0.0'
https://github.com/firebase/firebaseui-android#using-the-library-in-your-android-app
In the app's build.gradle I add to the firebase core library to the dependencies :
compile 'com.google.firebase:firebase-core:9.8.0'
Then depending which modules of firebase I want to use in addition, I add those in too, such as:
compile 'com.google.firebase:firebase-ads:9.8.0'
To use FirebaseUI, you need to add some dependencies:
implementation 'com.firebaseui:firebase-ui-auth:3.2.2'
// Required only if Facebook login support is required
implementation('com.facebook.android:facebook-android-sdk:4.33.0')
// Required only if Twitter login support is required
implementation("com.twitter.sdk.android:twitter-core:3.1.1#aar") { transitive = true }
Here is more information: FirebaseUI-android
Related
I'm in the final stages putting my project on cloud firebase. Added all required firebase requirements using the firebase console. The Android compile fails with the error: Could not find com.google.firebase:firebase-appcheck-playintegrity:.
This is a copy of the implementation in the build.gradle file:
implementation 'com.google.firebase:firebase-appcheck-playintegrity'
Is this the correct statement for these dependencies? I assume there is no version number. This project is my first attempt putting a project on the cloud firebase. Appreciate any help.
Roger
As per the documentation:
https://firebase.google.com/docs/app-check/android/play-integrity-provider?authuser=0#install-sdk
You don’t need to specify version only if you also defined BoM dependency. Otherwise version is required.
dependencies {
// Declare the dependency for the App Check library
// When NOT using the BoM, you must specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-appcheck-playintegrity:16.0.0'
}
I am using firebase:firebase-messaging library for push notification. While building the application I am seeing a warning which says
Warning: The app Gradle file must have a dependency on com.google.firebase:firebase-core for Firebase services to work as intended.
Release notes by firebase say
https://developers.google.com/android/guides/releases#may_23_2018
Firebase now requires the app Gradle file to explicitly list com.google.firebase:firebase-core as a dependency for Firebase services to work as expected.
Firebase-core library is used for analytics, what will happen if I don't include this library? I am already using gms:play-services-analytics.
Also, I have found the library version for both gms:play-services-analytics must be the same as firebase:firebase-core library to avoid any build error.
Something like below
implementation 'com.google.android.gms:play-services-analytics:16.0.4'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
Will there be any impact on the application if I will include firebase:firebase-core library in application gradle along with gms:play-services-analytics?
Why firebase is showing the above warning ?
What will be impacted if I don't include firebase-core with firebase-messaging library? A warning can be ignored?
Is this due to firebase adding analytics for all its features?
Here: https://support.google.com/firebase/answer/6383877?hl=en
If you don't include com.google.firebase:firebase-core, then you won't be able to use the other firebase services like firebase-database or firebase-messaging.
If you are using google-service version 3.2.1+, then you can use different library versions for gms:play-services-analytics and firebase:firebase-core.
I'm going to implement Sentry.io Log Service in my Android App.There is a comment in it's installation guide which says:
// this dependency is not required if you are already using your own
// slf4j implementation
compile 'org.slf4j:slf4j-nop:1.7.25'
I don't know I should add this dependency or not.
Does Android use it's own slf4j implementation?
As Henry said in comments, Android doesn't include an slf4j implementation, So I Should Add this dependency to get ready to setup Sentry.
Today meet some problem where I need to know the detailed difference between
compile 'com.firebase:firebase-client-android:2.4.0'
and
compile 'com.google.firebase:firebase-core:9.6.1'
Don't make attention to versions
So please share your knowledge.
The difference is that the first one is deprecated, the first one it is know as firebase 2.X.X and the firebase 3.X.X update use this dependencie compile 'com.google.firebase:firebase-core:9.6.1'.
In this page you can check what you need to install last Firebase SDK and their libraries. Greetings!
com.firebase:firebase-client-android is legacy. THEY ARE DEPRECATED AS OF MAY 18, 2016.
com.google.firebase:firebase-core is current
You can check it here
Also if you want to know the differrent beetween theme you can check 2 docs
https://firebase.google.com/docs/android/setup
https://www.firebase.com/docs/android/
If you need Firebase Client:
Firebase.getDefaultConfig().setLogLevel(com.firebase.client.Logger.Level.DEBUG);
You need the firebase client library:
dependencies {
// Firebase
implementation 'com.firebase:firebase-client-android:2.5.2'
I've imported in my project 2 libraries (in gradle file):
...
/* Firebase UI */
compile 'com.firebaseui:firebase-ui:0.4.0'
/* Facebook login */
compile 'com.facebook.android:facebook-android-sdk:4.13.0'
but when building my project I have the following error:
D:\Android\Projects\quoter\app\src\main\AndroidManifest.xml:68:13-58
Error: Attribute activity#com.facebook.FacebookActivity#theme
value=(#style/FirebaseUI.Translucent) from
[com.firebaseui:firebase-ui-auth:0.4.0] AndroidManifest.xml:68:13-58
is also present at [com.facebook.android:facebook-android-sdk:4.13.0]
AndroidManifest.xml:32:13-72
value=(#android:style/Theme.Translucent.NoTitleBar). Suggestion: add
'tools:replace="android:theme"' to element at
AndroidManifest.xml:64:9-68:61 to override.
I found the expanded jars with the manifest files for both Facebook sdk and Firebase UI libraries, but I'm not sure that changing them it's the right way to solve this error because each time I clean and re-build my project new manifests are also generated...
How can i solve this error? It seems to me an incopatibility between the 2 libraries...
Note: adding in my app manifest the following
<application
tools:node="replace"
solve this problem, but it's impossible to launch the app because Firebase it's not correctly initialized (see https://stackoverflow.com/a/38060272/6503817)
FirebaseUI already compiles Facebook for you, so when you try to sync it basically throws the error because you are trying to compile the same thing twice.
Remove compile 'com.facebook.android:facebook-android-sdk:4.13.0' and keep: compile 'com.firebaseui:firebase-ui:0.4.0'
and you are done!
Don't worry! You will still have Facebook Login
Unfortunately, "tools:replace" didn't work for me, but a GitHub issue in the Firebase UI has a solution https://github.com/firebase/FirebaseUI-Android/issues/230
But FirebaseUI already depends on version 4.11.0 of the SDK. Can you try removing your Facebook dependency and just relying on the transitive dependency brought in by FirebaseUI?
I would recommend you go through the documentation once, provided FirebaseUI Android and FirebaseUI Auth Android. They are pretty thorough and most likely will curb your doubts.