Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Errors running builder 'CDT Builder' when trying to build OpenCV for android samples

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

like image 479
Niko Adrianus Yuwono Avatar asked Jul 07 '12 18:07

Niko Adrianus Yuwono


3 Answers

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

like image 190
Wonho Jung Avatar answered Nov 02 '22 23:11

Wonho Jung


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.

like image 2
Lcsky Avatar answered Nov 02 '22 22:11

Lcsky


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()

like image 1
flankechen Avatar answered Nov 02 '22 22:11

flankechen