I am not able to build android app in Unity3D. Error: CommandWithNoStdoutInvokationFailure: Gradle initialization failed.

I am using an empty Unity Android project. I am not able to build APK since 2 weeks. I am getting this error

CommandWithNoStdoutInvokationFailure: Gradle initialization failed. 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)

Here is the Full Error Error Image

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).

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. However, I am not able to build it on my current Operation System. Please help.

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.