Search Unity

I NEED HELP QUICKLY: FormatException: Input string was not in the correct format System.Int64.Parse

Discussion in 'Scripting' started by jack06v, Feb 28, 2018.

  1. jack06v

    jack06v

    Joined:
    Feb 28, 2018
    Posts:
    2
    I want to build an apk but the console say this

    <pre>
    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
    ADCDependencies.RegisterAndroidDependencies () (at Assets/AdColony/Editor/ADCDependencies.cs:54)
    ADCDependencies.RegisterDependencies () (at Assets/AdColony/Editor/ADCDependencies.cs:43)
    ADCDependencies..cctor () (at Assets/AdColony/Editor/ADCDependencies.cs:34)
    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.InitPostprocessors (System.String pathName) (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:117)
    UnityEditor.AssetPostprocessingInternal:InitPostprocessors(String)
    UnityEditorInternal.InternalEditorUtility:projectWindowDrag(HierarchyProperty, Boolean)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    <code>

    how can I resolve this?
     
  2. Zalosath

    Zalosath

    Joined:
    Sep 13, 2014
    Posts:
    687
    What is ADCDependencies.cs line 54?
     
  3. jack06v

    jack06v

    Joined:
    Feb 28, 2018
    Posts:
    2
    it's AdColony assets, for in app ads
     
  4. Zalosath

    Zalosath

    Joined:
    Sep 13, 2014
    Posts:
    687
    Well, it's throwing a TypeInitializationException.
     
  5. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,187
    I would like to point out that adding "I NEED HELP QUICKLY" to your title doesn't make people want to help you more quickly. Actually could have the opposite effect.

    But, the error tells you exactly what is wrong. You are trying to parse a string into an int, but it can't do it because the string is not an int.
     
    Last edited: Feb 28, 2018