How to install Android NDK on Ubuntu 16.04 / 18.04

The Android NDK is a toolset that lets you implement parts of your app in native code, using languages such as C and C++. For certain types of apps, this can help you reuse code libraries written in those languages.

To install and configure the NDK, follow these steps:Download android ndk suitable for your platform from

 $ mkdir ~/android_ndk 
 $ cd ~/android_ndk 
$ wget -c 

Now extract the zip as,

 $ unzip 

This will extract as “Extracting  android-ndk-r20” into folder “android-ndk-r20” in ~/android_ndk directory. When uncompressed, the NDK files are contained in a directory called android-ndk-<version>. You can rename the NDK directory if necessary and you can move it to any location on your computer.

Related :   adb uninstall - ADB command to delete APK

Export the NDK path into environment variables,

 $ export PATH=$PATH:~/android_ndk/android-ndk-r20 

OR You can also edit your ~/.bashrc file and append above line to add NDK permanently to your path to avoid typing above command always.

Check if ndk-build is added to environment,

$ which ndk-build 

Sometimes, you may need to set NDK_HOME evnvironment variable which you can do the same way as above,

$ export NDK_HOME=~/android_ndk/android-ndk-r20


Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded