forked from googlesamples/google-signin-unity
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Issue Summary
Google Sign-In throws an exception on Android, while it works as expected on iOS.
Steps to Reproduce
Calling the following line on Android triggers the exception:
GoogleSignIn.DefaultInstance.SignIn().ContinueWith(OnAuthenticationFinished, TaskScheduler.FromCurrentSynchronizationContext());Observed Behavior
On Android, the following exception is thrown:
System.TypeInitializationException: The type initializer for 'Google.Impl.GoogleSignInImpl' threw an exception.
---> UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.google.googlesignin.GoogleSignInHelper
Expected Behavior
Google Sign-In should work correctly on Android, as it does on iOS.
Environment
Unity Version: 6000.1.4f1
Additional Context
If relevant, the app is also using Firebase and initializing it on startup with the following code:
await FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task =>
{
var dependencyStatus = task.Result;
if (dependencyStatus == DependencyStatus.Available)
{
FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);
FirebaseApp app = FirebaseApp.DefaultInstance;
Crashlytics.ReportUncaughtExceptionsAsFatal = true;
IsFirebaseIntialized = true;
}
else
{
Debug.LogError($"Could not resolve all Firebase dependencies: {dependencyStatus}");
IsFirebaseIntialized = false;
}
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels