赞
踩
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)
参考:
Errors when building as Android APK - Unity Forum
解决:
Edit -> Preferences -> External Tool -> Gradle Installed with Unity
勾选它
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。