InvalidOperationException:firebase实时数据库尚未正确初始化

时间:2016-11-12 03:49:11

标签: android unity3d firebase firebase-realtime-database unity5

我已按照https://github.com/firebase/quickstart-unity/blob/master/database/testapp/Assets/TestApp/UIHandler.cs

的说明进行操作

我在UnityEditor上测试好了,但是当我在Android设备上运行时 抛出

InvalidOperationException: The firebase realtime database has not been properly initialized. 11-12 10:39:31.724 28717 28760 I Unity : at Firebase.Database.Core.FirebaseConfigExtensions.CreatePlatform (Firebase.FirebaseApp app) [0x00000] in <filename unknown>:0 11-12 10:39:31.724 28717 28760 I Unity : at Firebase.Database.Internal.Core.Context.GetPlatform () [0x00000] in <filename unknown>:0 11-12 10:39:31.724 28717 28760 I Unity : at Firebase.Database.Internal.Core.Context.EnsureLogger () [0x00000] in <filename unknown>:0 11-12 10:39:31.724 28717 28760 I Unity : at Firebase.Database.Internal.Core.Context.InitServices () [0x00000] in <filename unknown>:0 11-12 10:39:31.724 28717 28760 I Unity : at Firebase.Database.Internal.Core.Context.Freeze () [0x00000] in <filename unknown>:0 11-12 10:39:31.724 28717 28760 I Unity : at Firebase.Database.Internal.Core.RepoManager.CreateLocalRepo (Firebase.Database.Internal.Core.Context ctx, Firebase.Database.Internal.Core.RepoInfo info, Firebase.Database.FirebaseDatabase firebaseDatabase) [0x00000] in <filename unknown>:0 11-12 10:39:31.724 28717 28760 I Unity : at Firebase.Database.Internal.Core.RepoManager.CreateRepo (Firebase.Database.Internal.Core.Context ctx, Firebase.Database.Internal.Core.RepoInfo info, Firebase.Database.Fireba

我没有找到这个问题的建议。对此有何理想?

我使用auth和analytic进行了测试,它确实有用。

1 个答案:

答案 0 :(得分:0)

我发现问题是PlayerSettings中的Striping Level。 当我将其返回“禁用”时,一切正常。 Cannot to be apply optimization when using Firebase Realtime Database