【問題記錄】【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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章