4

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.

drewster
  • 5,460
  • 5
  • 40
  • 50
  • Did you get the solution for this. – veeresh kumbar Nov 01 '17 at 13:18
  • 1
    @veereshkumbar I don't know where but there is a function in one of the scrips from your project that is failing.This could be from one of your plugins and the function is likely being called during the build time. This function is throwing an error that says *"FormatException: Input string was not in the correct format"*. This seems to be the `Convert.ToInt32` function. The person who wrote that code should have used `Int32.TryParse` [instead](https://stackoverflow.com/a/12269372/3785314). A bad code by somebody.... That's all I can tell you. – Programmer Nov 01 '17 at 15:59
  • @programmer Thanks for your reply. This error I'm getting when i have integrated FB SDK into my project. but when i build the code there where no errors. but when i build the project these error occurs – veeresh kumbar Nov 02 '17 at 05:10
  • 1
    I know. That's why I said the thing is happening during build time when you are building the project. It's from a third party library and you may want to file for bug with FB on their github. I have already explained the possible place this is happening in their plugin which seems to be at `Convert.ToInt32` so you can show them that – Programmer Nov 02 '17 at 05:23
  • I think I did come up with a solution... I will try to check for sure, but I think it had to do with the google jar resolver... I believe the Facebook SDK installed a different version and it ended up with part of an old version and part of a newer version installed. I believe I deleted it all and went and downloaded the latest jar resolver... – drewster Dec 01 '17 at 04:58
  • Did you face issue like this one : CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details. /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/shoaib/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" – eng.ahmed Dec 24 '17 at 05:17

0 Answers0