E/StorageUtil: error getting token java.util.concurrent.ExecutionException: com.Google.androID.gms.internal.zzand: Please sign in before trying to get a token.
我用谷歌搜索但无法得到答案!
我已经登录了firebase.
FirebaseAuth mAuth = FirebaseAuth.getInstance();
然后在onStart()中,
FirebaseUser user = mAuth.getCurrentUser();if (user != null) { // do your stuff} else { signInAnonymously();}
signInAnonymously()
private voID signInAnonymously() { mAuth.signInAnonymously().addOnSuccessListener(this,new OnSuccessListener<AuthResult>() { @OverrIDe public voID onSuccess(AuthResult authResult) { // do your stuff } }) .addOnFailureListener(this,new OnFailureListener() { @OverrIDe public voID onFailure(@NonNull Exception exception) { Log.e(TAG,"signInAnonymously:FAILURE",exception); } });}
这可以解决您的问题
总结以上是内存溢出为你收集整理的android – Firebase令牌身份验证错误全部内容,希望文章能够帮你解决android – Firebase令牌身份验证错误所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)