简体   繁体   English

Opencv4Android:如何在Eclipse中使用它?

[英]Opencv4Android : How to use it in eclipse?

I'm new to Android world and going to use OpenCV library in it. 我是Android世界的新手,将在其中使用OpenCV库。 I downloaded Opencv4Android-SDK from source-forge and tried to import it in eclipse using package explorer using this tutorial . 我从source- forge下载了Opencv4Android-SDK ,并尝试使用本教程的包资源管理器将其导入eclipse中。 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. 我正在使用最新的Android SDK,其中包括必需的Android SDK组件和带有内置ADT的Eclipse IDE版本。
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). 您需要通过Android SDK Manager安装API11和API9(然后关闭/重新打开Eclipse)。 API9 is deprecated, so to see it for download you have to mark the "Obsolete" checkmark on the bottom of your window. API9已弃用,因此要下载该文件,必须在窗口底部标记“过时”复选标记。

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. 要解决“无法解析目标'android-11'OpenCV示例-15-puzzle”错误,您只需:1.右键单击您的项目>属性> Android 2.然后在此处选择目标名称。 remember that the API's cannot be less than what needed. 请记住,API不能少于所需的API。

For the other problem, I am still on the lookout for a solution. 对于另一个问题,我仍在寻找解决方案。 I have the same problem. 我也有同样的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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