Fail to build Android on Unity 2022.2.0b10

I've been trying to build my Android game in a CI environment using GameCI and docker images of Unity. However, when attempting to make the build, I end up hitting this error:
[quote]
DisplayProgressbar: Detect Java Development Kit (JDK)
UnityException: JDK not found
Java Development Kit (JDK) directory is not set or invalid. Please, fix it in Edit / Unity -> Preferences -> External Tools
[/quote]
Now I'm not sure if this error is a red herring as above it, I see a message
[quote]
[ServicesCore]: To use Unity's dashboard services, you need to link your Unity project to a project ID. To do this, go to Project Settings to select your organization, select your project and then link a project ID. You also need to make sure your organization has access to the required products. Visit https://dashboard.unity3d.com to sign up.
[/quote]

One thing I did notice after digging more into the issue is when Unity is installed via the Unity Hub UI, it installs 9 dependencies and uses Android SDK/NDK versions 31/32 while the headless hub cli installs 8 dependencies and Android SDK/NDK versions 29/30 (and I presume a different version of openJDK as well). I tested this on a standard Ubuntu machine (not containerized to eliminate that as a variable) and saw this behavior as well.

Any ideas on how to resolve this? Appreciate any guidance I can get on this!

Just noticed the pinned Andoid post about hub not installing the correct tools. This is resolved.

I am also getting this error. Has anyone encountered this error like us?

Just noticed the pinned Andoid post about hub not installing the correct tools

Could you please point me to this post?
I am still having this issue.

2 Likes