Files
keepassgo/APK.md
T
Joe Julian 1c72a5009f
ci / lint-test (push) Successful in 1m17s
ci / build (push) Successful in 2m33s
Stamp app version into builds
2026-04-05 23:56:58 -07:00

50 lines
1.6 KiB
Markdown

# Android Build
Build the APK with:
```sh
make apk
```
Environment:
- `ANDROID_SDK_ROOT` defaults to `/opt/android-sdk`.
- `ANDROID_NDK_ROOT` defaults to `/opt/android-ndk`.
- `JAVA_HOME` defaults to `/usr/lib/jvm/java-25-openjdk`.
- `APP_ID` overrides the Android application id.
- `APP_VERSION` overrides the version shown inside KeePassGO itself.
- `APK_OUT` overrides the output path.
- `APK_VERSION` overrides the packaged app version.
- `ANDROID_MIN_SDK` overrides the minimum supported Android SDK.
- `ANDROID_TARGET_SDK` overrides the target Android SDK.
Installed machine prerequisites expected by this repo:
- `android-sdk-cmdline-tools-latest`
- `android-sdk-build-tools`
- `android-platform-35`
- `android-sdk-platform-tools`
- a working JDK install
The repo tracks `gogio` as a Go tool, so the build runs through:
```sh
go tool gogio -target android ...
```
The Android build uses the branded icon asset at:
- `assets/keepassgo-icon.png`
Note:
- Gio's Android doc currently references Java 1.8, but the Android build-tools
installed on this machine (`d8` from build-tools 37) do not run on Java 8.
- In this environment, KeePassGO's APK build requires a newer JDK runtime on
`PATH`, which is why the repo defaults `JAVA_HOME` to `/usr/lib/jvm/java-25-openjdk`.
- Android runtime testing on the `KeepassGoAPI35` emulator showed a black-screen
regression with `gioui.org v0.9.0` while a stock Gio example and KeePassGO both
rendered correctly with `gioui.org v0.8.0` on the same emulator and SDK/JDK
pipeline. KeePassGO is pinned to the working Gio line until that regression is
understood upstream.