Ask Your Question
0

I can't use openCV in Android.

asked 2013-01-03 03:10:21 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

I to set PATH android ndk in eclipse and now I think the path is work when I build progrom it show like this in console

15:42:49 * Incremental Build of configuration Default for project OpenCV Tutorial 3 - Add Native OpenCV * "C:\Apps\android-ndk-r8\ndk-build.cmd" Prebuilt : libgnustl_static.a <= <ndk>/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/ Install : libnative_sample.so => libs/armeabi-v7a/libnative_sample.so

15:42:49 Build Finished (took 350ms)

but when I run OpenCV Turial3 it show error

Your Project contain error(s) , please fix them before running your application.

I open file Sample3Native.java in this project. In first line it show this error

Open the Java build path property page of project 'OpenCV Tutorial 3 - Add Native OpenCV'

how to fix this error?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-01-05 04:34:09 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Tutorial-3 is Java application with native C++ part. Native part was built successfully. There are some problems with Java. There are several reasons for that:

  1. You use incompatible Android SDK version. There were several incompatible changes in Android SDK, that breaks OpenCV build. Update OpenCV up to 2.4.3.2 and Android SDK up to the latest version.

  2. You use old OpenCV with new Eclipse 4.x. Close Eclipse, remove .settings folder from OpenCV Java library project, run Eclipse again and rebuild all by Projects->clean..->All menu item.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-01-03 03:10:21 -0500

Seen: 333 times

Last updated: Jan 05 '13