Move support/android to a top-level android/ and make it build: Gradle 8.12 wrapper + AGP 8.7.3, compileSdk/targetSdk 35, SDL3 3.4.16 and FreeType 2.13.3 built once into build/android-deps (SDL Java sources copied from the same release), libSDL3.so staged as a jniLib, 16 KB page alignment, RelWithDebInfo native code for debug APKs, placeholder adaptive icon. build.sh installs and launches the APK when a phone is attached. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.4 KiB
AVA2 Android client
Gradle project for the arm64-v8a APK: SDL3 SDLActivity + libmain.so (the client, with the
embedded CPython 2.7). The APK holds code only. Game data (ymir work, maps, sound, python-root,
python27.zip) lives in the app's external storage directory, see push-assets.sh.
Architecture and roadmap: docs/MOBILE-ARCHITECTURE.md.
Requirements
- Android SDK with platform 35, NDK 27.2.12479018 and CMake 3.22.1 (
sdkmanager "ndk;27.2.12479018" "cmake;3.22.1") - JDK 17+ (
brew install openjdk@21;build.shfinds it automatically) - The SDK checkout beside this repository (
../sdk), as for the desktop build
Build
android/build.sh # debug APK; installs and launches it when a phone is attached
android/build.sh release # release APK
android/build.sh deps # only build SDL3 + FreeType into build/android-deps
The first run downloads and builds SDL3 and FreeType once into build/android-deps. The SDL
Java sources are copied from the same SDL release so they always match libSDL3.so. The debug
APK compiles C++ as RelWithDebInfo; a Debug build is too slow to judge frame rate.
Overrides: ANDROID_HOME, ANDROID_NDK_HOME, JAVA_HOME, AVA2_SDK_ROOT, AVA2_SOURCE_DIR
(CMake source tree to build instead of this checkout), ADB_SERIAL.
Android Studio can open this directory after android/build.sh deps has run once.
Logs: adb logcat -s SDL SDL/APP AndroidRuntime DEBUG.