I've been building a game with Unity which I've hooked up to Firebases Auth and Database in order to store data and handle login and so far I've had no trouble with the project in the Unity Editor.
However, once I build for Android it seems like everything that has to do with Firebase is missing. So far I've tried changing the Android Manifest, updating play services, deleting and reimporting everything that has to do with Firebase.
This is where I Initialize Firebase:
public class FirebaseLogin : MonoBehaviour {
public InputField emailField;
public InputField passwordField;
protected FirebaseAuth auth;
private FirebaseAuth otherAuth;
protected Dictionary userByAuth = new Dictionary ();
DependencyStatus dependencyStatus = DependencyStatus.UnavailableOther;
void Awake () {
//So far my code runs this line
DebugHelper.instance.Add ("Beginning");
//When I try to debug the following line nothing happens, so it probably produces an error
DebugHelper.instance.Add (FirebaseAuth.DefaultInstance.ToString ());
FirebaseApp.CheckAndFixDependenciesAsync ().ContinueWith (task => {
dependencyStatus = task.Result;
if (dependencyStatus == DependencyStatus.Available) {
InitializeFirebase ();
} else {
DebugHelper.instance.Add("Failed to initialize firebase");
Debug.LogError("Failed");
}
});
}
}
When I look at my logcat I'm getting the following error:
Unable to find FirebaseCppApp-5.1.1
E/Unity: DllNotFoundException: FirebaseCppApp-5.1.1 at (wrapper
managed-to-native)
Firebase.AppUtilPINVOKE/SWIGExceptionHelper:SWIGRegisterExceptionCallbacks_AppUtil(Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExc
eptionHelper/ExceptionDelegate)
at Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () [0x00000] in
:0
Rethrow as TypeInitializationException: An exception was thrown by the
type initialize
I have been struggling to find an answer for this, but as far as I could tell no one has had the same issue.
Thanks in advance for taking the time to help!