

OS X users may need to attrib -r -d /opt/android-ndk-r19c to remove quarantine bits. Lrwxrwxrwx 1 root root 22 Apr 10 12:41 /opt/android-ndk -> /opt/android-ndk-r19c/ $ sudo ln -s /opt/android-ndk-r19c/ /opt/android-ndk Lrwxrwxrwx 1 root root 17 android-ndk -> android-ndk-r18b/ĭrwxr-xr-x 12 root root 4096 android-ndk-r16bĭrwxr-xr-x 12 root root 4096 android-ndk-r17cĭrwxr-xr-x 12 root root 4096 android-ndk-r18bĭrwxr-xr-x 13 root root 4096 Mar 1 00:45 android-ndk-r19cĬreate or modify the android-ndk symlink as required. $ sudo unzip android-ndk-r19c-linux-x86_64.zip -d /opt $ curl -k -L -o android-ndk-r19c-linux-x86_64.zip

Note that the zip includes a directory structure with android-ndk-r19c, so the unzip only needs to use /opt. The NDK download is available at Android Developers | NDK | Downloads.

The first step to setup an Android build machine is install an NDK. If you want a GUI then see Is GUI for Android SDK manager gone? on Stack Overflow. The SDK Manager no longer provides a GUI. Also see Recommended NDK Directory? on the Android NDK mailing list. In your Android builds, you should always set ANDROID_NDK_ROOT and ANDROID_SDK_ROOT because the Android tools use them internally. Android-28 is the API level available with NDK r19. At the time of this writing, the latest NDK is r19c, and the latest SDK is revision 4333796. The process will mostly be the same for CentOS, Debian, OS X and Fedora. The last version of the NDK to support 32-bit Linux was r10. You must use a 64-bit version of the NDK for Linux. If you don't use Bash then you will have to modify things to suite your taste.Įach NDK needs about 2.5 to 3 GB of space, so be sure to have enough storage. The instructions also assume the Bash shell. The machine will have to meet minimum requirements, like Java 8 installed.

The steps below were performed on a Debian Stretch x86_64 machine because it was handy. Once ANDROID_NDK_ROOT, ANDROID_SDK_ROOT and ANDROID_HOME are set you should be ready to build the library. Third, environmental variables like ANDROID_NDK_ROOT and ANDROID_SDK_ROOT are set. The instructions should help with questions that arise when building for Android. They are implicitly used in wiki articles like Android (Command Line) and Android.mk. They are the same steps the Crypto++ project uses when setting-up for Android. This page will show you how to setup a build machine to test Android.
