Hello guys I'm trying to learn about openCV in android I've already following the instruction given here
but when I'm trying to compile I'm only getting
01:50:14 ** Auto Build of configuration Default for project org.opencv.samples.fd.FdActivity ** "C:\Android\android-ndk-r8\ndk-build.cmd" Install: libdetection_based_tracker.so => libs/armeabi-v7a/libdetection_based_tracker.so
01:50:14 Build Finished (took 184ms)
in the console and I'm also get an error
Errors occurred during the build. Errors running builder 'CDT Builder' on project 'org.opencv.samples.fd.FdActivity'. Internal error building project org.opencv.samples.fd.FdActivity configuration Default java.lang.NullPointerException Internal error building project org.opencv.samples.fd.FdActivity configuration Default java.lang.NullPointerException
anyone ever encountered this problem before? please help me to solve this problem
thank you
try
Project Properties>C/C++ Build>Tool Chain Editor
Current toolchain: Android GCC
Current builder: Android Builder
Project Properties>C/C++ Build
(uncheck) use default build command
Build command: ndk-build
(uncheck) generate Makefiles automatically
You may have renamed the project, and the eclipse forgot to rename the "Refresh Policy".
Just update "Project properties -> C/C++ Build -> Refresh Policy" manually solved my problem.
BTW, ADT has some very bad error descriptions as of in this case.
I might have the same problem, try ndk-build -B which rebuild all the things, see whether you still got error, if no error remain, there is no problem with your ndk-build. try to run your android apps without CDT installed, if this works, at least we could use comand line to build the c++ part of code.
but CDT is still not working well, after I install the CDT according to the opencv doc, I got lots of errors, add the cygwin and gcc things to the path would solved most of it. But the last things every strange is, I got an error here.
in the face detection sample, .cpp part
catch(cv::Exception e)
{
LOGD("nativeCreateObject catched cv::Exception: %s", e.what());
it always says symbol "e" can not be resolved.
but no error when I include the opencv things. even when I try to put cv::Exception e outside of the catch()
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