1
\$\begingroup\$

I'm getting this error when trying to build my game for Android, I've googled it but there's only 1 result about it and it didn't work for me as I use 64-bit windows. How can I fix this and what's causing it?

ArgumentNullException: Value cannot be null. Parameter name: path1 System.IO.Path.Combine (System.String path1, System.String path2) (at :0) UnityEditor.Android.AndroidComponentProperties.Read (System.String directory) (at :0) UnityEditor.Android.AndroidComponentProperties.GetPackageRevision (System.String directory) (at :0) UnityEditor.Android.AndroidSDKTools.BuildToolsVersion () (at :0) UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKBuildToolsDetector.GetVersion (UnityEditor.Android.AndroidSDKTools sdkTools, UnityEditor.Android.AndroidJavaTools javaTools) (at :0) UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector.Detect (UnityEditor.Android.AndroidSDKTools sdkTools, UnityEditor.Android.AndroidJavaTools javaTools, System.Version minVersion, UnityEditor.Android.PostProcessor.ProgressHandler onProgress) (at :0) UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.EnsureSDKComponentVersion (UnityEditor.Android.AndroidJavaTools javaTools, System.Version minVersion, UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK+SDKComponentDetector detector) (at :0) UnityEditor.Android.PostProcessor.Tasks.CheckAndroidSDK.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0) UnityEditor.Android.PostProcessAndroidPlayer.PrepareForBuild (UnityEditor.BuildOptions options, UnityEditor.BuildTarget target) (at :0) UnityEditor.Android.AndroidBuildPostprocessor.PrepareForBuild (UnityEditor.BuildOptions options, UnityEditor.BuildTarget target) (at :0) UnityEditor.PostprocessBuildPlayer.PrepareForBuild (UnityEditor.BuildOptions options, UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:106) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Error building Player: ArgumentNullException: Value cannot be null. Parameter name: path1

Build completed with a result of 'Failed' UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

\$\endgroup\$
2
\$\begingroup\$

restarting unity fixed the problem for me

\$\endgroup\$
1
\$\begingroup\$

Uninstalling Unity/Visual Studio and installing them again fixed the problem for me.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.