How to find the ndk revision number for your android setup

I got the same problem when I was trying to build this version of boost and use the following line to retrieve my NDK version.

version=$(sed -En -e 's/^Pkg.Revision\s*=\s*([0-9a-f]+)/r\1/p' $source_properties)

Where source_properties=$AndroidNDKRoot"/source.properties" at the root of your NDK folder.


In Android Studio version 4.1.1, I can find the installed NDK version from the menu. Go to Tools->SDK Manager(or Files->Settings->Appearance & Behavior->System Settings->Android SDK). Then select the SDK Tools tab, and check the Show Package Details checkbox. You will see your NDK version.

enter image description here


There's a source.properties file in the root of the NDK for r11 and newer. Older versions had a RELEASE.TXT.