I am working on a Unity project where i'm deploying to iOS and Android. I successfully launched onto the iOS appstore and was trying to deploy to Android appstore. Suddenly been getting the errors below which now also impact my iOS build.
I've been looking at the following Unity error for days and I can't for the life of me figure out what is wrong. Not sure what has changed.
System.TypeLoadException: Could not resolve type with token 01000075 from typeref (expected class 'Google.EditorInitializer' in assembly 'Google.VersionHandlerImpl, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null')
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes (System.Type[]) (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorAssemblies.cs:130)`
`System.TypeLoadException: Could not resolve type with token 01000075 from typeref (expected class 'Google.EditorInitializer' in assembly 'Google.VersionHandlerImpl, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null')
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes (System.Type[]) (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorAssemblies.cs:130)`
`TypeLoadException: Could not resolve type with token 01000075 from typeref (expected class 'Google.EditorInitializer' in assembly 'Google.VersionHandlerImpl, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null')
Rethrow as TypeInitializationException: The type initializer for 'Firebase.Editor.GenerateXmlFromGoogleServicesJson' threw an exception.
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <b6c5d0f08ddf477186f780f49bb14dee>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <b6c5d0f08ddf477186f780f49bb14dee>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <b6c5d0f08ddf477186f780f49bb14dee>:0)
UnityEditor.AssetPostprocessingInternal.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) (at /Users/bokken/build/output/unity/unity/Editor/Mono/AssetPostprocessor.cs:1145)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets, System.Boolean didDomainReload) (at /Users/bokken/build/output/unity/unity/Editor/Mono/AssetPostprocessor.cs:385)
I have tried reinstalling Unity entirely, downgrading and upgrading Unity, removing modules and reinstalling them, etc. I haven't changed any code since I last built the app (successfully) so I don't think it is an issue in my code.
For what its worth - ChatGPT has no clue either.