Video
This will guide you through the steps of setting up Azure DevOps pipeline for building a Unity Android project.
Requirements
- Have a Azure DevOps account.
- Unity editor installed.
- Unity Android modules installed.
Notes
- Butler won’t upload if there are multiple builds in the same folder. (WebGL and Android), so delete one or just clean out the build folder.
- Set “JDK” system level environmental variable to “2.182.1” to get the build to start.
- Set “Android_Home” system level environmental variable to [android_folder/sdk]. Example [C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK]
Steps
- Install Android modules if missing.
- Locate Android SDK in [C:\Program Files\Unity\Hub\Editor\[Editor_Version]\Editor\Data\PlaybackEngines\AndroidPlayer\SDK].
- Create Android_Home system level environmental variable with path from step 2.
- Create JDK system level environmental variable with value of 2.182.1 or what ever the missing JDK version is.
- Restart service Azure Pipelines Agent.
- Add Android Signing and Aligning task.
- Disable signing option in Android Signing and Aligning task since we don’t have the certificates needed right now.
- Edit PowerShell script for the Butler publishing from whatever channel ie WebGL to Android.
- Remove any other builds in the Azure Agent build folder ie [C:\agent\_work\1\b] since it will prevent butler from publishing the build.
- Execute the pipeline to test.