[英]I am not able to build android app in Unity3D. Error Gradle initialization failed
I am using an empty Unity Android project.我正在使用一个空的 Unity Android 项目。 I am not able to build APK since 2 weeks.自 2 周以来,我无法构建 APK。 I am getting this error我收到此错误
CommandWithNoStdoutInvokationFailure: Gradle initialization failed. CommandWithNoStdoutInvokationFailure:Gradle 初始化失败。 UnityEditor.Android.Command.RunWithShellExecute (System.String command, System.String args, System.String workingdir, System.String errorMsg) (at <4132c5c2cd7b45b09ef33302ae416489>:0) UnityEditor.Android.AndroidJavaTools.RunJavaWithShellExecute (System.String args, System.String workingdir, System.String error) (at <4132c5c2cd7b45b09ef33302ae416489>:0) UnityEditor.Android.Command.RunWithShellExecute (System.String command, System.String args, System.String workingdir, System.String errorMsg) (at <4132c5c2cd7b45b09ef33302ae416489>:0) UnityEditor.Android.AndroidJavaTools.RunJavaWithShellExecute,System.String .String 工作目录,System.String 错误)(位于 <4132c5c2cd7b45b09ef33302ae416489>:0)
Here is the full Error:这是完整的错误:
I am not getting any solution on the internet as in Latest version of Unity 2019.1.6f1, JDK, Android SDK and NDK are installed within Unity (installed while installing Unity).我在互联网上没有得到任何解决方案,因为最新版本的 Unity 2019.1.6f1,JDK、Android SDK 和 NDK 安装在 Unity 中(安装 Unity 时安装)。
I have installed new Windows 10 in my another Drive and Installed same Unity Version in the new Windows 10. And it built successfully without any issue.我在另一个驱动器中安装了新的 Windows 10,并在新的 Windows 10 中安装了相同的 Unity 版本。它成功构建,没有任何问题。 However I am not able to build it on my current Operation System.但是我无法在我当前的操作系统上构建它。 Please help.请帮忙。
是的 gradle build 每次都会导致错误,将构建系统从“gradle”更改为“internal”。
I hope this helps someone because this took me forever to fix with no other solutions available online for this exact error message and multiple users reporting the issue.我希望这对某人有所帮助,因为这花了我永远的时间来修复,而没有其他在线解决方案可用于此确切的错误消息和多个用户报告该问题。
I think this problem might be caused by some type of permissions/file access problem.我认为这个问题可能是由某种类型的权限/文件访问问题引起的。 In my case my Unity project was located on a network share that was being synced for offline access.就我而言,我的 Unity 项目位于同步以供离线访问的网络共享上。 As soon as I copied the files to my local C:\\ drive the problem went away.一旦我将文件复制到本地 C:\\ 驱动器,问题就消失了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.