Search code examples
androidsha1google-calendar-api

Why am I getting the following exception everytime on android studio?


I'm implementing Google calendar API on android step by step from the documentation: https://developers.google.com/google-apps/calendar/quickstart/android. I've finished all the steps including getting the SHA1 key and putting it on the Google API interface. But when I run the app, I get the following exception:

Caused by: com.google.android.gms.auth.GoogleAuthException: 
UNREGISTERED_ON_API_CONSOLE
05-03 15:30:24.681 8823-8895/com.example.quickstart W/System.err:     
at com.google.android.gms.auth.zze$1.zzat(Unknown Source)
05-03 15:30:24.681 8823-8895/com.example.quickstart W/System.err:     
at com.google.android.gms.auth.zze$1.zzau(Unknown Source)
05-03 15:30:24.681 8823-8895/com.example.quickstart W/System.err:                         
at com.google.android.gms.auth.zze.zza(Unknown Source)
05-03 15:30:24.681 8823-8895/com.example.quickstart W/System.err:     
at com.google.android.gms.auth.zze.zzc(Unknown Source)

Solution

  • This because of wrong sha1 fingerprint, To create debug fingerprint just click on gradle (right in android studio) then click on your project(root) and then double click on signiningReport then you can see your system sha1 fingerprint in android studio console. And now you can register it on api console.