game-ci / unity-builder

Build Unity projects for different platforms
https://github.com/marketplace/actions/unity-builder
MIT License
852 stars 250 forks source link

Install additional Android SDKs on Windows runners #671

Open dri-richard opened 1 month ago

dri-richard commented 1 month ago

Context

On Windows runners, using a target Android SDK version lower than one shipped with Unity gives an error, e.g. targeting SDK 32 with Unity 2022.3 which is required for Meta Quest:

##[error]UnityException: Target Android SDK not installed
Android SDK does not include your Target SDK of 32.

This occurs even when specifying AndroidTargetSdkVersion: AndroidApiLevel32 as a parameter in the workflow.

Linux runners take care of this, due to #582 being implemented in response to #581

Additional context: I prefer to maintain a fleet of WIndows runners to allow Windows IL2CPP builds of a different project.

Suggested solution

Invoke the sdkmanager, similarly to #582

Additional details

Discord thread