Skip to content

Instantly share code, notes, and snippets.

@jonnybrooks
jonnybrooks / _creating_a_purely_cpp_android_app_with_the_ndk.md
Last active June 7, 2025 04:10
Creaing a purely C++ Android app with the NDK (and without Android Studio)

Creating a purely C++ Java app with the NDK (and without Android Studio)

There are a few main steps to getting this working:

  1. Install tools - Android SDK (along /w JDK and build-tools), and the NDK
  2. Configure project - setting up AndroidManifest.xml, adding android_native_app_glue to your project
  3. Build - setup Android.mk for use with ndk-build, and write a simple build script to pipe it all together

Install tools

If you haven't already, you'll need to install the Android SDK (which I think includes the JDK? Otherwise grab that as well), the Android NDK, and the SDK build-tools. You can do that using SDK manager. Downloading these will get you the following tools:

  • ndk-build (NDK) - for building the final .so file for the .apk
  • aapt (build-tools) - this is for packaging your .apk (app) file