Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android NDK build path not found

I see the error as shown in the screenshot when I try to build the NDK OpenCV Android program. I have added the lines:

NDK_HOME=C:\android-ndk-rd8 export NDK_HOME

to my .bashrc file in cygwin. I am working on Windows 7 and my NDK is at C:\android-ndk-rd8

I thought adding the above lines would fix it, but it didn't work. How do I get the program to compile? Do I have to change the PATH variable? If so, how exactly do I do that?enter image description here

like image 513
user1210233 Avatar asked Dec 28 '12 17:12

user1210233


People also ask

Where can I find NDK location?

Open your Android Studio Preference (or "File->Settings") > Appearance & Behavior > System Settings > Android SDK. You can find the path to your SDK and NDK, which is in the same directory.

How do I know if android NDK is installed?

You'll need to point to your NDK in your eclipse by adding the path of ndk-build to Window > preferences > android > NDK. Right click on your project folder. Choose android tools -> add native support (the bottom one) and click finish.

What is NDK build?

To compile and debug native code for your app, you need the following components: The Android Native Development Kit (NDK): a set of tools that allows you to use C and C++ code with Android. CMake: an external build tool that works alongside Gradle to build your native library.


2 Answers

From your error log I suppose you should specify SA environment variable, you can do it in eclipse properties for your project:

Project properties -> C/C++ Build -> Enviroment -> Here press button Add.. -> and put Name: SA with Value: path to your NDK folder

like image 52
marcinj Avatar answered Sep 28 '22 09:09

marcinj


I think, from Eclipse environmental variables are referred something like {env:NDK_HOME}. In Properties|C++|Build or something like that

like image 35
Alexander Kulyakhtin Avatar answered Sep 28 '22 08:09

Alexander Kulyakhtin