- Home /
ArgumentNullException: Value cannot be null. Parameter name: key
I encountered this error while trying to build the IOS version of the project and I've been searching but I'm still clueless, it'd be great if you could help. and here's the full description:
ArgumentNullException: Value cannot be null. Parameter name: key System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) (at :0) System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) (at :0) UnityEditor.iOS.Xcode.PBX.KnownSectionBase`1[T].get_Item (System.String guid) (at C:/buildslave/unity/build/External/XcodeAPI/Xcode/PBX/Sections.cs:86) UnityEditor.iOS.Xcode.PBXProject.AddBuildFileImpl (System.String targetGuid, System.String fileGuid, System.Boolean weak, System.String compileFlags) (at C:/buildslave/unity/build/External/XcodeAPI/Xcode/PBXProject.cs:256) UnityEditor.iOS.Xcode.PBXProject.AddFileToBuild (System.String targetGuid, System.String fileGuid) (at C:/buildslave/unity/build/External/XcodeAPI/Xcode/PBXProject.cs:280) GameAnalyticsSDK.Editor.GA_PostprocessBuild.OnPostprocessBuild (UnityEditor.BuildTarget buildTarget, System.String path) (at Assets/GameAnalytics/Editor/GA_PostprocessBuild.cs:25) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0) UnityEditor.Build.BuildPipelineInterfaces+AttributeCallbackWrapper.OnPostprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at :0) UnityEditor.Build.BuildPipelineInterfaces+<>c_DisplayClass17_0.b_1 (UnityEditor.Build.IPostprocessBuildWithReport bpp) (at :0) UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at :0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I think you removed your comment? Have you seen this? It looks similar to your exception. https://stackoverflow.com/questions/32709927/rethrow-as-targetinvocationexception-error
Answer by HappiiGamer · Oct 22, 2019 at 12:36 PM
You have a Dictionary into which you are trying to insert a NULL as Value.