- Home /
Android app is not building in Unity, Error “Gradle initialization failed.”
I am getting an error while building the Android app in Unity. "Gradle build failed. See the console for details."
I am getting this error:
CommandWithNoStdoutInvokationFailure: Gradle initialization failed
UnityEditor.Android.Command.RunWithShellExecute.....(very long error message)....
FAILURE: Build failed with an exception.
* What went wrong:
Java heap space
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
I am using latest Version of Unity 2019.1.4f1. I tried building a blank app. But it is not able to build.
Comment
Answer by SeanBannister · Aug 09, 2020 at 04:12 AM
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. As soon as I copied the files to my local C:\ drive the problem went away.