【问题记录】【Unity打包Android】ArgumentNullException: Value cannot be null. Parameter name: path1

Unity版本:2019.3.15

报错:

ArgumentNullException: Value cannot be null.
Parameter name: path1
System.IO.Path.Combine (System.String path1, System.String path2) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEditor.Utils.Paths.Combine (System.String[] components) (at <40fb318d110545438eb9e740c9e9b793>:0)
UnityEditor.Android.AndroidGradleRoot.GetGradleLaunchJarPath (System.String directory) (at <8d91af8ba381482d8e64ffef4d559bbc>:0)
UnityEditor.Android.GradleWrapper.GetBaseCommand (System.Int32 jvmHeapSize) (at <8d91af8ba381482d8e64ffef4d559bbc>:0)
UnityEditor.Android.PostProcessAndroidPlayer.ExecuteWarmup (System.String stagingArea) (at <8d91af8ba381482d8e64ffef4d559bbc>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <8d91af8ba381482d8e64ffef4d559bbc>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <8d91af8ba381482d8e64ffef4d559bbc>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <40fb318d110545438eb9e740c9e9b793>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

参考:

https://forum.unity.com/threads/errors-when-building-as-android-apk.744212/#post-5226149

解决:

Edit -> Preferences -> External Tool -> Gradle Installed with Unity

【问题记录】【Unity打包Android】ArgumentNullException: Value cannot be null. Parameter name: path1_第1张图片

你可能感兴趣的:(问题记录)