简体   繁体   English

Firebase的Unity Auth错误

[英]Unity Auth Error With Firebase

I implemented Firebase into a Unity app I am creating. 我将Firebase应用到我正在创建的Unity应用程序中。 There are two buttons that will run the two functions to create a new user and login an existing user. 有两个按钮可以运行这两个功能来创建新用户并登录现有用户。 So far this functionality works on my PC, however whenever I try to deploy it to my android phone or Mac I end up getting the following error in the console. 到目前为止,这个功能在我的电脑上运行,但每当我尝试将其部署到我的Android手机或Mac时,我最终会在控制台中收到以下错误。

DllNotFoundException: FirebaseCppApp-5.1.0
Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for SWIGExceptionHelper
Firebase.AppUtilPINVOKE..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Firebase.AppUtilPINVOKE
Firebase.AppUtil.SetLogFunction (Firebase.LogMessageDelegate arg0)

It appears there is a missing .dll file, however I cannot for the life of me find out how to include it within the project file. 它似乎有一个丢失的.dll文件,但是我不能为我的生活找到如何将它包含在项目文件中。 I also have double checked the package name and it is the exact same name as the one made for my Firebase project, the google-services JSON in the root of the project, and the Api compatibility level is set to .NET 2.0. 我还仔细检查了软件包名称,它与我的Firebase项目名称完全相同,项目根目录中的google-services JSON,以及Api兼容级别设置为.NET 2.0。 On top of that I also uninstalled and reinstalled the app a few times. 最重要的是,我也卸载并重新安装了几次应用程序。 I also tried using the Play Services Resolver which didn't help much at all either. 我也尝试使用Play服务解析器,它根本没用。

Similar error here, only with Firebase Cloud Messaging. 此处类似错误,仅适用于Firebase云消息传递。 After tinkering around in a fashion similar to yours I concluded that it was caused by corruption during import of Firebase Package. 在以类似于你的方式修补之后,我得出结论,这是由导入Firebase Package时的损坏引起的。

What worked for me: 什么对我有用:

  • Deleted each and every folder created while importing Firebase Package. 删除导入Firebase包时创建的每个文件夹。

在此输入图像描述

  • Reimported Firebase Package 重新导入的Firebase套装

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM