From 78715551ee6bb68b54f7803cd05139e1e6eb73f0 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 1 Jul 2026 18:16:34 +0000 Subject: [PATCH 1/2] fix(ci): upgrade android-actions/setup-android from v2 to v3 v2 fails to accept new Android SDK license agreements (GoogleTV and XR emulator licenses) on Ubicloud runners that lack pre-accepted licenses. v3 handles license acceptance more robustly via piped input. Fixes the Build apk/aab job failure on master. --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 364ada1d..c17fe169 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,7 +42,7 @@ jobs: # Android SDK & NDK - name: Set up Android SDK if: steps.cache-jniLibs.outputs.cache-hit != 'true' - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 - name: Set up Android NDK if: steps.cache-jniLibs.outputs.cache-hit != 'true' run: | @@ -196,7 +196,7 @@ jobs: # Android SDK & NDK - name: Set up Android SDK - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 - name: Set up Android NDK run: | sdkmanager "ndk;${{ env.NDK_VERSION }}" @@ -281,7 +281,7 @@ jobs: # Android SDK & NDK (NDK required at Gradle configuration time even for JVM unit tests) - name: Set up Android SDK - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 - name: Set up Android NDK run: | sdkmanager "ndk;${{ env.NDK_VERSION }}" @@ -344,7 +344,7 @@ jobs: run: brew install intel-haxm - name: Set up Android SDK - uses: android-actions/setup-android@v2 + uses: android-actions/setup-android@v3 # # # Below code is majorly from https://github.com/actions/runner-images/issues/6152#issuecomment-1243718140 - name: Create Android emulator From ee36f8c731190b2e9fa99d71fbf63fe97d9fdca9 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 1 Jul 2026 19:14:05 +0000 Subject: [PATCH 2/2] fix(ci): pin ANDROID_AVD_HOME for setup-android@v3 compatibility android-actions/setup-android@v3 no longer sets ANDROID_SDK_HOME (deprecated by Google), which caused avdmanager to write the AVD to a location the emulator binary couldn't find. Explicitly set ANDROID_AVD_HOME=$HOME/.android/avd before running avdmanager and persist it to GITHUB_ENV for the Start emulator step. Also adds ls verification so future failures show the AVD directory state. --- .github/workflows/build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c17fe169..09cd58d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -349,12 +349,25 @@ jobs: # # # Below code is majorly from https://github.com/actions/runner-images/issues/6152#issuecomment-1243718140 - name: Create Android emulator run: | + # Pin AVD home so avdmanager and emulator agree on the location. + # android-actions/setup-android@v3 no longer exports ANDROID_SDK_HOME + # (it was deprecated by Google), so we set ANDROID_AVD_HOME explicitly + # and persist it for subsequent steps via GITHUB_ENV. + AVD_HOME="$HOME/.android/avd" + mkdir -p "$AVD_HOME" + echo "ANDROID_AVD_HOME=$AVD_HOME" >> "$GITHUB_ENV" + export ANDROID_AVD_HOME="$AVD_HOME" + # Install AVD files echo "y" | sdkmanager --install 'system-images;android-'$MATRIX_E_SDK';default;x86_64' echo "y" | sdkmanager --licenses # Create emulator avdmanager create avd -n $MATRIX_AVD -d pixel --package 'system-images;android-'$MATRIX_E_SDK';default;x86_64' + + # Verify AVD was created before proceeding + echo "AVDs in $ANDROID_AVD_HOME:" + ls -la "$ANDROID_AVD_HOME/" 2>/dev/null || echo "WARNING: AVD directory empty after creation!" $ANDROID_HOME/emulator/emulator -list-avds if false; then emulator_config=~/.android/avd/$MATRIX_AVD.avd/config.ini