Skip to content

Android: sync NDK r29 / min API 25 / build-tools 37 with apothecary - #8575

Open
danoli3 wants to merge 1 commit into
openframeworks:masterfrom
danoli3:android-sync-apothecary
Open

danoli3 wants to merge 1 commit into
openframeworks:masterfrom
danoli3:android-sync-apothecary

Conversation

@danoli3

@danoli3 danoli3 commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Android toolchain update

Updates the openFrameworks Android setup so OF core, project templates, CI, and Apothecary all use the same Android toolchain.

Main changes:

  • NDK → 29.0.14206865 everywhere
  • Minimum Android API → 25
  • Android Build Tools → 37.0.0
  • CI now uses the same exact NDK/API versions as local builds.

Build script improvements:

  • cmake.sh now uses the requested NDK version, rather than just picking the newest installed NDK.
  • Gives a useful error if that NDK isn’t installed.
  • Supports ANDROID_HOME / ANDROID_SDK_ROOT correctly on macOS.
  • Defaults to API 25.
  • Avoids accidentally selecting broken/half-installed NDKs.

Apple Silicon fix:

  • Android’s NDK doesn’t provide a separate darwin-arm64 toolchain directory.
  • OF now correctly falls back to the universal darwin-x86_64 tools.
  • This fixes CMake Android builds on Apple Silicon Macs.

Tested:

  • Core builds successfully on Apple Silicon with NDK 29.
  • Correctly ignores a broken NDK 30 installation.
  • Android template project builds successfully.
  • App installs and runs on an Android 14 ARM64 emulator.
  • GL test app passes.

Match apothecary's Android CI (build-android.yml, android_configure.sh)
so the core, the template and the prebuilt libs use the same toolchain:

- NDK r29 29.0.14206865 (template + core gradle ndkVersion, cmake.sh,
  of.yml env); previously 28.2 in gradle, "27" / newest folder in
  cmake.sh and the runner's latest NDK in CI
- min API 25 (template was 24, core gradle and cmake.sh were 34, so the
  core wouldn't load below Android 14)
- build-tools 37.0.0 (was 35.0.0)
- cmake.sh: use the pinned $NDK under the SDK (or ANDROID_NDK_ROOT /
  ANDROID_NDK_HOME) instead of silently taking the newest ndk folder,
  which also picked up half-installed NDKs; ANDROID_PLATFORM follows
  ANDROID_API; honour ANDROID_HOME / ANDROID_SDK_ROOT on macOS
- android.toolchain.cmake: NDKs ship only darwin-x86_64 (universal) /
  linux-x86_64, so fall back to the x86_64 prebuilt when the arm64 host
  folder doesn't exist (failed on Apple silicon before)
@danoli3 danoli3 mentioned this pull request Oct 8, 2026
danoli3 added a commit to danoli3/openFrameworks that referenced this pull request Oct 8, 2026
@danoli3

danoli3 commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

#8533 (OpenGLES 3.1) is now stacked on this PR and was fully retested on top of it: macOS GL 2.1–4.1, iOS ES 1.1/2.0/3.0, emscripten WebGL 1/2, and Android ES 1.1/2.0/3.0/3.1 built with this PR's cmake.sh (NDK 29.0.14206865, no overrides) and template settings (minSdk 25, build-tools 37). Results: #8533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant