On Ubuntu or debian

To install Android SDK and NDK follow the link to Android Studio, download and install Android Studio. Once installed start Android Studio using default settings. This allows to download Android SDK that will be installed in $HOME/Android/sdk on Ubuntu or in $HOME/Library/Android/sdk folder on OSX. Now to install Android NDK, with Android Studio create a new Android project. As described in this guide, from this new project enter "Android SDK" settings, select the "SDK Tools" tab and check the boxes next to LLDB, CMake, and NDK. To access to "Android SDK" settings pannel on Ubuntu go through "File \> Settings..." menu, while under OSX, go through "Android Studio \> Preferences" menu.

On Mac OSX

To install Android SDK and NDK follow the link to Android Studio, download and install Android Studio. Once installed start Android Studio using default settings. This allows to download Android SDK that will be installed in $HOME/Android/sdk on Ubuntu or in $HOME/Library/Android/sdk folder on OSX. Now to install Android NDK, with Android Studio create a new Android project. As described in this guide, from this new project enter "Android SDK" settings, select the "SDK Tools" tab and check the boxes next to LLDB, CMake, and NDK. To access to "Android SDK" settings pannel on Ubuntu go through "File \> Settings..." menu, while under OSX, go through "Android Studio \> Preferences" menu.

We suppose now that ViSP source is in the directory $VISP_WS/visp. The following should be adapted if you downloaded ViSP from a zip or tarball. In that case, the source is rather in something like $VISP_WS/visp-x.y.z.

Build ViSP Android SDK

Note that the scripts for building the SDK are included in the source code.

In the workspace create a build folder

$ mkdir $VISP_WS/visp-build-android-sdk

Enter the directory $VISP_WS/platforms/android having the python build script and check which are the command line options that are available.

Above command will build SDK for multiple Android architectures. If you're aware on what Android architecture you'll be working on (refer here), say x86_64, you can do a minimal build by changing contents of ndk-*.config.py file

ABIs = [

ABI("5", "x86_64", None)

]

This will speed up the installation process.

Once build ViSP Android SDK will be available in $VISP_WS/visp-build-android-sdk/ViSP-android-sdk/sdk folder. Its content should be similar to the following:

Tips & tricks

How to know Android NDK version

Start Android Studio

on Ubuntu enter File > Settings... menu, while on Mac OSX enter Android Studio > Preferences... menu select Android SDK in the left part and selct SDK Tools tab to see which is the NDK version that you are using: