6565 echo "ls $ANDROID_HOME/cmdline-tools/latest/bin/"
6666 ls -lah $ANDROID_HOME/cmdline-tools/latest/bin/ || true
6767 echo "install ndk"
68- $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "ndk;27.2.12479018 "
68+ $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "ndk;27.3.13750724 "
6969 - name : List available space
7070 run : |
7171 df -h
8383 fi
8484 done
8585 echo ""
86+ echo "=== IMPORTANT: gomobile uses ANDROID_NDK_HOME (highest priority) ==="
87+ echo "See https://github.com/golang/mobile/blob/master/cmd/gomobile/env.go"
88+ echo ""
8689 echo "=== All Environment Variables ==="
8790 env | sort
8891 echo ""
@@ -105,14 +108,13 @@ jobs:
105108
106109 - name : Build
107110 run : |
108- export ANDROID_NDK_ROOT =$ANDROID_HOME/ndk/27.2.12479018
109- unset ANDROID_NDK_HOME
111+ export ANDROID_NDK_HOME =$ANDROID_HOME/ndk/27.3.13750724
112+ unset ANDROID_NDK_ROOT
110113 echo "=== Build step NDK env ==="
111- echo "ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT "
112- echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME "
114+ echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME (gomobile uses this) "
115+ echo "ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT (unset for gomobile) "
113116 echo "ANDROID_NDK=$ANDROID_NDK"
114117 echo "ANDROID_NDK_PATH=$ANDROID_NDK_PATH"
115- echo "NDK_ROOT=$NDK_ROOT"
116118 echo ""
117119 echo "=== All Android env vars ==="
118120 env | grep -i android | sort
@@ -125,15 +127,15 @@ jobs:
125127 echo ""
126128 gomobile init -v 2>&1
127129 echo ""
128- echo "=== After gomobile init, checking NDK ==="
129- env | grep -i ndk
130+ echo "=== After gomobile init, checking NDK (gomobile uses ANDROID_NDK_HOME) ==="
131+ env | grep -i ndk | sort
130132 go mod tidy -compat=1.26
131133 cd cmd/awl-tray && go mod tidy -compat=1.26 && cd ../..
132134 echo "check go mod tidy and git dirty"
133135 test -z "$(git status --porcelain)" || (git status; git diff && false)
134136 echo "=== Before build.sh ==="
135- echo "ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT"
136137 echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME"
138+ echo "ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT"
137139 echo "=== Gradle local.properties ==="
138140 cat ../awl-flutter/android/local.properties 2>/dev/null || echo "No local.properties"
139141 echo "=== gradle.properties ==="
0 commit comments