0
\$\begingroup\$

I downloaded Unity 2021.3.6f1 from Unity Hub for Windows and Android Build but Unity didn't download the gradle which is required for Android build so i download gradle 7.5 and linked it to unity but when i try to build andriod build it show same error as before(as without gradle) . Error:

FileNotFoundException: Failed to find $C:/Program Files/Unity/Hub/Editor/2021.3.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\GradleTemplates\mainTemplate.gradle UnityEditor.Android.AndroidBuildPostprocessor.GetTemplate (System.String toolsPath, System.String fileName) (at <0bc7e9c04c1540528b26863a0cb726ae>:0) UnityEditor.Android.AndroidBuildPostprocessor+d__21.MoveNext () (at <0bc7e9c04c1540528b26863a0cb726ae>:0) UnityEditor.Modules.BeeBuildPostprocessor.SetupBeeDriver (UnityEditor.Modules.BuildPostProcessArgs args) (at <44a70d1b13cf47e29810e30f45ffae08>:0) UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <44a70d1b13cf47e29810e30f45ffae08>:0) Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown. UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <44a70d1b13cf47e29810e30f45ffae08>:0) UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <44a70d1b13cf47e29810e30f45ffae08>:0) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <0bc7e9c04c1540528b26863a0cb726ae>:0) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, 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 <44a70d1b13cf47e29810e30f45ffae08>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Build completed with a result of 'Failed' in 50 seconds (49803 ms) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <44a70d1b13cf47e29810e30f45ffae08>:0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <44a70d1b13cf47e29810e30f45ffae08>:0

What is the solution?

enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ Are you sure your linking is done correctly? The file Not Found error is switching between / and \ in the path \$\endgroup\$ Commented Jul 26, 2022 at 18:13
  • \$\begingroup\$ Is this existing Q&A of any use to you? \$\endgroup\$ Commented Jul 27, 2022 at 12:47

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.