简体   繁体   中英

Opencv4Android : How to use it in eclipse?

I'm new to Android world and going to use OpenCV library in it. I downloaded Opencv4Android-SDK from source-forge and tried to import it in eclipse using package explorer using this tutorial . Every thing went OK but I encountered this error :

Unable to resolve target 'android-9'    OpenCV Library - 2.4.2      Unknown Android Target Problem  


The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files    Video.java  /OpenCV Library - 2.4.2/src/org/opencv/video    line 1  Java Problem  


The project cannot be built until build path errors are resolved    OpenCV Sample - 15-puzzle       Unknown Java Problem


The container 'Android Dependencies' references non existing library 'C:\andcv\OpenCV-2.4.2-android-sdk\sdk\java\bin\opencv library - 2.4.2.jar'    OpenCV Sample - 15-puzzle       Build path  Build Path Problem


Unable to resolve target 'android-11'   OpenCV Sample - 15-puzzle       Unknown Android Target Problem


The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project    OpenCV Library - 2.4.2      Unknown Java Problem

Im using latest Android SDK that includes the essential Android SDK components and a version of the Eclipse IDE with built-in ADT.
How can I fix this error? thanks.

You need to install API11 and API9 via the Android SDK Manager (and then close/re-open Eclipse). API9 is deprecated, so to see it for download you have to mark the "Obsolete" checkmark on the bottom of your window.

To solve the "Unable to resolve target 'android-11' OpenCV Sample - 15-puzzle" error, you just have to: 1. right click on your project > Properties > Android 2. then choose the target name there. remember that the API's cannot be less than what needed.

For the other problem, I am still on the lookout for a solution. I have the same problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM