I need help. I'm trying to install and configure OpenCV 2.4.7 library
in my computer (Ubuntu 12.04). After run OpenCV samples appears those errors in my Console:
Cannot run program "/NDK-build"
: Unknown reason
Error: Program "/NDK-build"
not found in PATH=[/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games]
I've seen numerous tutorials and nothing worked. I ask you to be very specific since I am "new" programming and also because my mother tongue is not English (I have some difficulties). Thank you!
The Native Development Kit (NDK) is a set of tools that allows you to use C and C++ code with Android, and provides platform libraries you can use to manage native activities and access physical device components, such as sensors and touch input.
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.
To use Android NDK support in your application, you need to download the following three tools: LLDB: It is used by Android Studio to debug the native code present in your project. NDK: Native Development Kit(NDK) is used to code in C and C++ i.e. native languages for Android.
Easiest Method which worked for me is.
Goto the Project Properties
Click on C/C++ Build (An other list will open)
Click on the Environment from the list
Now click on Add
Here you have to Put 2 values
Put Name as NDKROOT
In Value put PATH TO THE NDK FOLDER
You are done :)
Same case happened with me (when my NDK location was already set), so changing to original Android Builder removed my problem for doing so simply go to project properties, C/C++ Build | Tool Chain Editor and select Android Builder as current builder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With