问题
I am building a Unity project (targeting Android) under Unity 2017.2.0f3 (64bit MacOS High Sierra) with Facebook's Unity plugin v7.10.1 (released a few days ago), and am seeing this error at BUILD time:
FormatException: Input string was not in the correct format
System.Int64.Parse (System.String s) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Int64.cs:458)
System.Convert.ToInt64 (System.String value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Convert.cs:1404)
Google.VersionHandler+FileMetadata.CalculateVersion (System.String versionString)
Google.VersionHandler+FileMetadata.CalculateVersion ()
Google.VersionHandler+FileMetadataByVersion.Add (Google.FileMetadata metadata)
Google.VersionHandler+FileMetadataSet.Add (Google.FileMetadata metadata)
Google.VersionHandler+FileMetadataSet.ParseFromFilenames (System.String[] filenames)
Google.VersionHandler.UpdateVersionedAssets (Boolean forceUpdate)
Google.VersionHandler..cctor ()
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Google.VersionHandler
Facebook.Unity.Editor.AndroidSupportLibraryResolver.setupDependencies ()
Facebook.Unity.Editor.AndroidSupportLibraryResolver..cctor ()
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:519)
System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:528)
System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:77)
System.Activator.CreateInstance (System.Type type, Boolean nonPublic) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:372)
System.Activator.CreateInstance (System.Type type) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Activator.cs:254)
UnityEditor.AssetPostprocessingInternal.GetMeshProcessorVersions () (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:164)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I'm building for Android.
来源:https://stackoverflow.com/questions/46938647/unity-2017-2-0f3-with-facebook-7-10-1-build-error-formatexception-input-string