I followed the instructions at Firebase Analytics quick start, but even after 24 hours, no user session was registered at Firebase Console.
I know that my google-services.json is correct because Firebase Auth is working properly (both Google and Facebook users are visible on the dashboard).
My Gradle dependencies are:
dependencies {
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.14.1'
compile 'com.google.android.gms:play-services-auth:9.2.1'
compile 'com.google.android.gms:play-services-maps:9.2.1'
compile 'com.google.code.gson:gson:2.1'
compile 'com.google.firebase:firebase-auth:9.2.1'
compile 'com.google.firebase:firebase-core:9.2.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
}
At August, 1st 2016, Google Developers upgraded Firebase quickstart examples on GitHub
Firebase version was upgraded from 9.2.1 to 9.4.0, which seems to have fixed my Analytics update issues.
I was facing same problem what i missed in my project gradle file add this dependency
classpath 'com.google.gms:google-services:3.0.0'
and in my android gradle or you can say app gradle i add this
in last line
apply plugin: 'com.google.gms.google-services'
Related
I am following the Push Campaigns Quickstart at https://developers.facebook.com/docs/push-notifications/quickstart. At the beginning of the document, I found this paragraph:
Prior to sending in-app notifications you will also need to integrate
the FBNotifications library.
Based on the documentation at https://github.com/facebook/FBNotifications, I need to add the following to my gradle dependencies:
compile 'com.facebook.android:notifications:1.+'
I already have this in my gradle dependencies:
compile 'com.facebook.android:facebook-android-sdk:3.23.1'
Does Facebook SDK 3.23.1 (com.facebook.android:facebook-android-sdk:3.23.1) include the FBNotifications library (com.facebook.android:notifications:1.+)? Thank you.
EDIT: In the question at Android In-App Notifications Integration Popup not showing, the asker is using both 'com.facebook.android:facebook-android-sdk:4.+' and 'com.facebook.android:notifications:1.+'. That makes me think that Facebook SDK does not include the FBNotifications library.
I was examining the code at https://github.com/facebook/FBNotifications/blob/master/Android/notifications-example/build.gradle and I found this block of code:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'commons-io:commons-io:2.4'
compile project(':notifications')
apply plugin: 'com.google.gms.google-services'
}
I see how the code includes both 'com.facebook.android:facebook-android-sdk:4.+' and project(':notifications'). Conclusion: Facebook SDK does not include FBNotifications.
I am working on geofencing app in Android. If I set the
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-location:9.0.1'
}
it works fine.If I changed it to
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-location:11.0.2'
}
I get following error.
package com.google.android.gms.maps does not exist
package com.google.android.gms.maps.model does not exist
Why? I need to set it to 11.0.2 for integrating it with other app.
Sync Project With Gradle File may help. Just click the button next to AVD Manager or navigate through Tools->Android->Sync Project With Gradle File.
Try to sync your project with gradle file but if gradle sync failed then download the latest version of gradle and specify its path under build.gradle and try to sync again.
you got to install the missing google play services.
Go to settings and update your google play services and google repository to latest version which is 46 means you got to use this version 11.0.46
Let me show you my current build dependencies so you understand my frustation:
dependencies {
compile 'com.google.android.gms:play-services-ads:8.3.+'
compile 'com.google.android.gms:play-services-wearable:8.3.+'
compile 'com.google.android.gms:play-services-plus:8.3.+'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.onesignal:OneSignal:2.+#aar'
compile 'com.google.android.gms:play-services-analytics:8.3.+'
compile "com.google.android.gms:play-services-location:8.3.+"
compile 'com.google.android.gms:play-services-gcm:8.3.+'
compile 'com.android.support:design:22.2.+'
//for now disable wearApp dependency for PaidRelease builds
wearApp project(':wearable')
compile 'com.squareup:otto:1.3.5'
compile fileTree(dir: 'libs', include: ['*.jar'])
//compile 'com.android.support:support-v4:22.0.+'
compile 'com.android.support:appcompat-v7:23.0.+'
}
and here are my wearable dependencies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.support:wearable:1.2.0'
compile 'com.google.android.gms:play-services-wearable:7.5.0'
}
Notice in my apps dependencies i am using 8.3.+ for the version meaning only update minor version changes. Admob wrote me the following a few days ago:
In order to ensure that your ads continue to serve after September 15th, 2016, please upgrade to Google Mobile Ads SDK 7.0.0 or higher.
They said one way to do this is to just update the entire google play services to 9.0.2. But I am not using entire Play Service dependencies. As you can see I just get the exact packages I need to save space and method count.
The issue:
If I were to replace the following line:
compile 'com.google.android.gms:play-services-ads:8.3.+'
with
compile 'com.google.android.gms:play-services-ads:9.0.2'
I am not confident it will work with the 8.3.+ jars I depend on. Wont I have to update the entire google play services jars I am using to be 9.0.+ also?
You're already using version 8.3 as denoted by play-services-ads:8.3.+, well above the 7.0.0 cutoff, so there's no action needed on your part.
Here is my build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.github.castorflex.smoothprogressbar:library:1.1.0'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.google.firebase:firebase-core:9.0.2'
compile 'com.google.firebase:firebase-analytics:9.0.2'
compile 'com.google.firebase:firebase-ads:9.0.2'
compile 'com.google.firebase:firebase-crash:9.0.2'
compile 'com.google.firebase:firebase-messaging:9.0.2'
}
apply plugin: 'com.google.gms.google-services'
app freezes when the app resumes. it gives anr (activity not responding) error.
is there any problem with play services 9.0+ or with firebase ?
I was solved the issue by removing the line
compile 'com.google.android.gms:play-services:9.0.2'
Seems to be the same issue as this: Firebase Crash produces ANR during launch
The official fix for the incident is an update to the Google Play Services which should be rolling out now.
We've fixed the issue with Firebase Crash initialization in Google Play Services 9.6.83. Users should receive the update sometime within the next two days. We will conduct an internal investigation of this issue and make appropriate improvements to our systems to prevent or minimize future recurrence.
Just add this line to dependencies:
implementation 'com.firebaseui:firebase-ui-auth:7.1.1'
I'm using Android Studio 1.5 and trying to add Firebase UI library to my application.
I've added it to my dependencies.
For some reason I'm getting the NoClassDefFoundError exception.
I've read that I should add Firebase-UI jar to my 'libs' folder, but I can't find it.
Any suggestions?
Most likely your missing the Google Play Services dependency from your app's build.gradle. For reference, this is one of mine:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.firebaseui:firebase-ui:0.3.0'
compile 'com.google.android.gms:play-services-auth:8.3.0'
}
FirebaseUI depends on com.google.android.gms:play-services-auth:8.3.0 for its Google authentication. For all dependencies, see this section of the README.