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

5

16

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

Wernerwernerite answered 7/7, 2012 at 18:52 Comment(2)
Maybe building native code from command line will suffice?Horntail
I've been trying to build it from the command line like the tutorial give me,but the command line didn't compile and build but only showing Install: libdetection_based_tracker.so => libs/armeabi-v7a/libdetection_based_tracker.soWernerwernerite
L
20

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

Lemar answered 9/5, 2013 at 13:15 Comment(0)
D
2

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.

Drayman answered 18/6, 2014 at 3:47 Comment(1)
Thanks. This one just fixed my project build.Sundries
M
1

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

Mapel answered 19/9, 2012 at 6:37 Comment(0)
S
1

These works for me:

Build command: ndk-build
(uncheck) generate Makefiles automatically 
Starr answered 9/7, 2014 at 9:52 Comment(0)
T
0

I'm new to Eclipse and I was setting up the environment for C++ development. I created a "hello_world" project and tried to build it for the first time. However, I encountered an error saying that CMake was not found. To resolve this issue, I installed CMake and attempted to build the project again, then this error occurs:

Errors occurred during the build. Errors running builder 'CDT Core Builder' on project 'hello_world'. Resource '/hello_world/build/default/compile_commands.json' does not exist. Resource '/hello_world/build/default/compile_commands.json' does not exist. Resource '/hello_world/build/default/compile_commands.json' does not exist. Resource '/hello_world/build/default/compile_commands.json' does not exist.

Fortunately, I found a solution by clicking on the Toolbar, then selecting Project -> C/C++ Index -> Freshen All Files. After performing this action and running the project again, the error disappeared.

Troubadour answered 1/6, 2023 at 18:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.