Error
Error when trying new versions of Google Fit samples,
E/AndroidRuntime: FATAL EXCEPTION: GoogleApiHandler
Process: com.google.android.gms.fit.samples.basicrecordingapi, PID: 22949
java.lang.NullPointerException: Attempt to invoke virtual method 'android.accounts.Account com.google.android.gms.auth.api.signin.GoogleSignInAccount.getAccount()' on a null object reference
at com.google.android.gms.common.api.GoogleApi.zzagd(Unknown Source)
at com.google.android.gms.common.api.GoogleApi.zza(Unknown Source)
at com.google.android.gms.common.api.internal.zzbr.<init>(Unknown Source)
at com.google.android.gms.common.api.internal.zzbp.zzb(Unknown Source)
at com.google.android.gms.common.api.internal.zzbp.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:158)
at android.os.HandlerThread.run(HandlerThread.java:61)
have changed the methods and I have noticed that since then my application using the old methods does not record data for DataType TYPE_ACTIVITY_SEGMENT, TYPE_STEP_COUNT_DELTA and sometimes TYPE_HEART_RATE_BPM. What is the solution?
@jaag12 hi, which sample did you try?
stepCounter and HistoryApiSample both have this error
Hi, any update about this error ? it's really annoying
@swapps ok, ill make for you, so which one do you wanna?
I am getting the same issue with play-services 11.6.0 and the latest session api samples at http://bit.ly/2AFpN8D
Hi everyone, I was getting this error too, it seems that we need to configure the demo project to work with our debug-release keystores, so all we need to do is Get an OAuth 2.0 Client ID and run the application again, no changes in code needed, only registering our SHA1 fingerprint.
@jaag12 make the following changes to your gradle.properties, sync and run the app
google_play_services_library=11.8.0
google_support_library=26.1.0
this solved the crash issue I faced with the same log printed in your logcat.
Hey guys need a little help here. I'm not able to remove the listener in the sensorsApi sample. The log cat says "Listener was not removed" . Don't know what to do. Stuck on this problem for a long time now.
check your application id and package name are same. that was my issue now working perfectly
I am closing this issue/PR, as it has been migrated to the new repo linked above in the comments. Thank you!