Closed FlorianKirmaier closed 2 years ago
The following workaround seems to fix the issue:
- name: Install NDK 21
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
echo 'ANDROID_NDK=/usr/local/lib/android/sdk/ndk/21.4.7075529' >> $GITHUB_ENV
echo 'ANDROID_NDK_HOME=/usr/local/lib/android/sdk/ndk/21.4.7075529' >> $GITHUB_ENV
echo 'ANDROID_NDK_LATEST_HOME=/usr/local/lib/android/sdk/ndk/21.4.7075529' >> $GITHUB_ENV
echo 'ANDROID_NDK_ROOT=/usr/local/lib/android/sdk/ndk/21.4.7075529' >> $GITHUB_ENV
We fixed this issue on Attach yesterday, which is built on macOS 11, which still has NDK 21.4: https://github.com/gluonhq/attach/blob/master/.github/workflows/build.yml#L33
Ubuntu 20.04, however, might not have it: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#android
We could use your patch, which seems fine, but that would only help for this Hello Gluon CI case. However, we could fix this issue in Substrate though, which is the one installing the default NDK after all (which now is 25), as this affects anyone locally that builds for Android without NDK installed yet.
Okay, I've removed my Android folder and reinstalled it with Substrate, it seems idk-bundle
still works, and it downloads 22.1.7171670, which then works fine to build an Android APK. So nothing to fix on Substrate.
I've also reviewed the logs from the GitHub action, and while it downloads the whole Android packages, it doesn't download the Android NDK, because ANDROID_NDK
is already set (now to 25).
So we could try:
ANDROID_SDK
to ANDROID_HOME
ANDROID_NDK=$ANDROID_HOME/ndk/23.2.8568313
I haven't tested that one yet, hopefully it will still work
Fixed with Substrate release and plugin 1.0.15
@johanvos @jperedadnr
The Android build no longer works since ... Today.
It's indepdendent of the.project. I think it due to the change of the default NDK from 21 to 25 on the 1. Auguest https://github.com/actions/virtual-environments/issues/5930
Here is a link to a failing build: https://github.com/FlorianKirmaier/hello-gluon-ci-test-browser/runs/7652185424?check_suite_focus=true
At the end i get the following exception:
Adding the following Statement to the github actions build didn't fix it: