- Home /
Unity App. When you run it again after "Application.Quit() " , FirebaseApp.CheckDependenciesAsync() Crash.
using SDKs Unity 2018.4 version FirebaseAuth FirebaseDatabase FirebaseMessaging FaceBook Unity IAP
According to the document, to use FireBase, you have to this first. link : https://firebase.google.com/docs/unity/setup
Firebase.FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => {
var dependencyStatus = task.Result;
if (dependencyStatus == Firebase.DependencyStatus.Available) {
FirebaseAuth.auth = FirebaseAuth.DefaultInstance;
auth.StateChanged += AuthStateChanged;
AuthStateChanged(this, null);
DatabaseReference DBreference = FirebaseDatabase.DefaultInstance.RootReference;
Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived;
Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived;
} else {
UnityEngine.Debug.LogError(System.String.Format(
"Could not resolve all Firebase dependencies: {0}", dependencyStatus));
}
});
Everything's normal when smartphone shuts down the app directly. But if you close with "Escape Button" code "Application.Quit()" and then re-run it, the above code will cause a crush. If you run it again, it will work as normal.
i think The point at which the problem occurs is when Firebase.FirebaseApp.CheckAndFixDependenciesAsync() happens.
how do i fix it?
Comment