Unity(2021.3.6f1c1)在我打包安卓的时候,第一次打包成功了,第二次装了一些模块WebGL和Windows Build Support (lL2CPP)Lunxi和macOS还有IOS之后打包个Web端再打包安卓就不行了。现在更换了版本(2021.3.11f1c2)安装了安卓模块其他啥都没装也照样无法打包,没有在网上找到解决方案。
在打包安卓时用了自定义密钥,之前打包成功的一次用了测试密钥。
具体报错信息:
CommandInvokationFailure: Gradle build failed.
D:\unity\2021.3.11f1c2\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\unity\2021.3.11f1c2\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <65a84ee2ce3f4dafabf1b2e40e55898c>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <65a84ee2ce3f4dafabf1b2e40e55898c>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
在次期间只添加了一个脚本
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class OpenWebPage : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
this.GetComponent<Button>().onClick.AddListener(OnClick);
}
void OnClick()
{
Application.OpenURL("https://space.bilibili.com/隐私不便公开");
}
}
这东西照抄案例的,估计没啥关系
求解决/(ㄒoㄒ)/~~