Xamarin.android默认FirebaseApp在此过程中未初始化 [英] Xamarin.android Default FirebaseApp is not initialized in this process

查看:77
本文介绍了Xamarin.android默认FirebaseApp在此过程中未初始化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了从Firebase获取令牌的问题(推送通知)

I face issue with get token from firebase (push notification)

Default FirebaseApp is not initialized in this process com.ready_apps.Nebka.Business. Make sure to call FirebaseApp.initializeApp(Context) first.

甚至我也叫FirebaseApp.InitializeApp(this);在很多地方

even I called FirebaseApp.InitializeApp(this); in many places

MyApplication(扩展了Application),在Activity的onCreate中,我将其称为FirebaseInstanceId.Instance?.Token;

MyApplication (that extend Application) , in onCreate of Activity where I call FirebaseInstanceId.Instance?.Token;

推荐答案

此错误已在Xamarin.Firebase 57.1104.0-beta1版本中修复.

This bug has been fixed in Xamarin.Firebase version 57.1104.0-beta1.

较新版本的Xamarin Firebase中似乎存在此错误.使用最新的稳定版本42.1021.1,到今天为止,我还遇到此错误. (该错误也出现在最新的beta版本中.)

This error seems to be present in the newer versions of Firebase for Xamarin. I am also experiencing this error as of today, using the latest stable version 42.1021.1. (The error is also present in the latest beta build).

我发现已针对该问题此处.

如错误报告中所述,删除您的Android项目中的/obj和/bin文件夹,和/或在Visual Studio中清理该项目应暂时解决此问题,直到您更新将更改Resource.Designer的任何资源为止. .cs文件.

As mentioned in the bug report, deleting both the /obj and /bin folders in your Android project, and/or cleaning the project in Visual Studio should fix the problem temporarily until you update any resource that would change the Resource.Designer.cs file.

在可以使用永久解决方案之前,还可以降级到Firebase和Google Play服务的较早版本.例如,我在Firebase和Google Play服务版本32.961.0上没有遇到此错误.

Downgrading to an older version of Firebase and Google Play Services is also possible before a permanent solution is available. I did not experience this error on Firebase and Google Play Services version 32.961.0, for example.

这篇关于Xamarin.android默认FirebaseApp在此过程中未初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆