Firebase 10.0.: InternalFirebaseAuth.FIREBASE_AUTH_API is not available on this device

时光总嘲笑我的痴心妄想 提交于 2019-12-30 03:24:08

问题


I am developping an Android application using Firebase Authentication (using Google account) and I recently experience the following exception every time I try to connect:

com.google.firebase.FirebaseApiNotAvailableException: API: InternalFirebaseAuth.FIREBASE_AUTH_API is not available on this device. at com.google.firebase.zza.zzz(Unknown Source) at com.google.android.gms.internal.zzzq$zzd.zzy(Unknown Source) at com.google.android.gms.internal.zzaap$zza.zzC(Unknown Source) at com.google.android.gms.internal.zzaap$zza.onConnectionFailed(Unknown Source) at com.google.android.gms.internal.zzaap$zzb$1.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:730) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:176) at android.os.HandlerThread.run(HandlerThread.java:61)

I'm quite surprised since the authentication worked very well until a few days ago...

I use firebase 10.0.1.

Do someone have ever experienced this error and resolved it?


回答1:


I think you are using your phone as a emulator. So, on your phone,

  1. Go to your Google Play Services.
  2. Open its App Info.
  3. Clear the Data and Cache.

path: --> (Settings > Apps > Google Play services > Storage > Manage Space > Clear All Data).

open the app after few minutes.




回答2:


Maybe your emulator doesn't have google play




回答3:


You have to install google play for virtual machine.
For Ex:go to google search: "install google play service for genymotion" , and it will be guide you to install




回答4:


You get this error bcz your device not having 'Google play services' so that it can't integrate with.. For those who have been using Genymotion virtual or other(Other than Android studio emulator itself) they need to add these services(Play store, Google, etc).. For this search 'How to install Google play services in Genymotion emulator'

Sometime you also get Default firebase is not initialized in this process for this you must upgrade your classpath and dependency both in gradle script (project and module app respectively) ...

classpath 'com.google.gms:google-services:-.-.-' implementation 'com.google.firebase:firebase-auth:-.-.-'



来源:https://stackoverflow.com/questions/41384895/firebase-10-0-internalfirebaseauth-firebase-auth-api-is-not-available-on-this

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!