0

I am trying to compile these library into my android code https://sdk.dronecode.org/en/contributing/build.html . This library has C/C++ written code. Therefore NDK will be used here.

When I try to hit the command sudo make android install I get this error:

Makefile:152: *** NDK_ROOT is undefined, please point the environment variable to android-ndk root.. Stop.

I have set the environment variable into my .bashrc file . But still getting this error, please help me out to get this compiled. I am using ubuntu 16.04. I have checked the other links "NDK_ROOT not defined. Please define NDK_ROOT in your environment" but couldn't helped much.

1 Answers1

0

sudo does not source .bashrc

You can try directly running the command with your env explicitly defined

i.e. sudo NDK_ROOT=xxxxx make android install

or follow the advices here, using .profile

William Chong
  • 2,107
  • 13
  • 24