I linked my Android app with Firebase using Android Studio Which created and set my google-service.json into my project.
When i debug my event logging in logcat i got :
V/FA-SVC: Successful upload. Got network response. code, size: 204, 0
But nothing is showing into firebase console debug view
Test device setup
To enable sending of DebugView data on a connected Android test device for a configured Firebase Analytics app, execute the following command:
adb shell setprop debug.firebase.analytics.app [your_app_package_name]
This behavior persists until you explicitly disable it by executing the following command:
adb shell setprop debug.firebase.analytics.app .none.
After performing Enabling debug mode make sure that date&time in your debug device or emulator and in your pc is correct.
Enabling debug logging is different from enabling debug mode. As Frank van Puffelen suggested in his comment, to enable debug mode you need to set "debug.firebase.analytics.app" property to your app package name.
You can do this using adb with the following command:
adb shell setprop debug.firebase.analytics.app "your.app.package.name"
You can find the package name of your app inside your AndroidManifest.xml
as the package
attribute on the manifest
element (first element in the xml document).
- Run your app in debug mode
- Goto Developer Options -> Select debug app -> Select
You will see your device listed in Firebase DebugView
As others have mentioned, I think commonly the issue here is using the wrong package name. I had this problem with an app I recently started collaborating on, and using the package attribute from AndroidManifest.xml wasn't working. I suspected that the build was appending something to the package name but couldn't find the place where this was defined. The simplest way I found to discover the actual package name was to launch "Attach debugger to Android process" in the top bar on Android Studio, which then shows a list of processes with their associated package names on the AVD. Sure enough, using the correctly-appended package name taken from this list did then cause Firebase Analytics Debug View to wake up.
Disable any ad-blocking mechanism in your debugging device. This was the problem here. I had AdAway enabled.
I know the question is old, however it may help someone.
来源:https://stackoverflow.com/questions/42769236/firebase-analytics-debug-view-does-not-show-anything