Can't build for Android

Latest Hub 3.2.0 in combination with Unity 2021.3.6 can’t build for Android because there is a missing Tools folder inside *Editor\Data\PlaybackEngines\AndroidPlayer* so Unity can’t find gradle.

That folder is simply not created during the installation.
The workaround is to copy the whole Tools folder from the previous Unity version or if you don’t have the previous version then do what @Zeeppo-Games says in the post below .

29 Likes

It didn’t get download even if you select Android module while installing form hub?

Installed all Android modules like always…

I had the same issue, looks like the gradle folder has changed from AndroidPlayer\SDK\Tools to AndroidPlayer\SDK\cmdline-tools but the path still the old one inside Unity preferences.

17 Likes

Right, this is it. I was able to build it. Copy all folders and files inside cmdline-tools, create a new folder called Tools inside AndroidPlayer folder and paste there.

Unity guys, you’ve forgotten to change the paths in AndroidBuildPostProcessor!!!

Edit: or maybe this is something related to Android SDK 33, the one I’m using to build this version of the game.

38 Likes

Having the same issue, rolling back to Unity 2021.3.5 for now

2 Likes

I can confirm the paths are wrong in 2021.3.6 and not specific to Android sdk version. Wondering how it even passed QA :hushed:

4 Likes

I guess making an empty project and building for android is not one of the tests they do before they release their latest LTS to the world.

Unity is a dumpster fire.

16 Likes

Yep there’s a bug there.
You have to manually use the Fix that ZeppoGames says.

Yep broken.
Missing dependencies.

Hi all,

I had the same issue iMobCoding reported at the beginning of the thread and following his workaround helped me in “unlocking” the next problem. I could solve this by following Zeeppo-Games’s hint.

So both helped me a lot, thanks to both of you!

Regarding the QA of Unity. That seems really sloppy to me… .

It worked for me… Thanks @Zeepoo-Games

@Tomas1856 Could you please take a look at this bug? When will the fixed version be available?

Thank you for the solution. More thanks Unity QA team. Use LTS version they said…

1 Like

Is there already a bug report filed?

Probably not, bug reports are a waste of time IMO.

thank you,
copied from Windows 10 (2021.3.5f) to Mac for M1 version (2021.3.6), worked too

They fixed multiple of my issues actually, so I don’t quite agree there

1 Like

On average, it’s less effort to work around the issues than to get Unity to fix them in a timeframe that matters.

6 Likes

Many studios work on a project for months-years, so it depends on your project. And doing something for your future projects or future developers can be nice for 5 minutes of work