NDK_ROOT error

#1

Hello Team ,

I am using the DroneCodeSDK . But when I try to build for the android , I hit this command “sudo make android install” but I get this error" Makefile:152: *** NDK_ROOT is undefined, please point the environment variable to android-ndk root… Stop". Although I have set the NDK_ROOT in .bashrc. Also i have set NDK_ROOT from command prompt . I am using Ubuntu. I am not able to build the code for android. Please suggest how to get rid of this error.

#2

Hi @canopus_three so we don’t currently support the Java wrappers. If you want to build for the Android architectures (such as armeabi-v7a, arm64-v8a) and then write your own ndk wrappers around it in order to interface it to Java, you can do that but I suggest to wait for the real Java wrappers.

To fix the error that you see, you need to install the Android NDK, and then set the environment variable NDK_ROOT to the path where you installed it to, e.g.:

export NDK_ROOT=$HOME/Android/ndk