Android build. Gradle build failed.

Hi, I am using
LTS 2021.3.8f1 +
I have both the Android and Windows modules installed.

Every time I try to build a project to Android, I get these 5 errors. Really not sure if this is how it's supposed to work.

Maybe some of you had a similar experience and know how to fix it.

I am attaching 2 screenshots and 2 text files with detailed bug logs.

8365971--1101960--bug_android build failure.PNG 8365971--1101963--bug_android console errors.PNG

8365971--1101966--bug_android build error text 2.txt (11.7 KB)
8365971--1101972--bug_android build error text.txt (5.42 KB)

Have you checked the detailed messages for all the errors?
Also, you can try exporting android studio project and building there, maybe that will give a more useful error.

[quote=“Aurimas-Cernius”, post:2, topic: 891256]
Have you checked the detailed messages for all the errors?
[/quote]

Hi Aurimas-Cernius,
yes, I did read the detailed messages, but these don’t ring a bell, in other words, I cannot process what I am reading to get a set of actions that needs to be done in order for this to work.
Am I supposed to be proficient in this kind of stuff to make an Android build in Unity? This is like the baseline level?

[quote=“Aurimas-Cernius”, post:2, topic: 891256]
Also, you can try exporting android studio project and building there, maybe that will give a more useful error.
[/quote]

Would you like me to do that and post the results here?

SOLVED

Solution that worked for me:
Unfortunately I did not test it step-by step, so any or all of these steps might be necessary.

1) Download and install Android Studio, go to settings

  • change tools to 30.0.3
  • change platforms to 11.0

2) Download Gradle 6.9
3) Download JDK 1.8.0_77

4) Change Unity External Tools as shown in the picture
8366670--1102143--unity android working export - external tools settings.PNG

5) Create a keystore
8366670--1102146--unity android working export - keystore settings.PNG