我有一些麻烦,添加OpenCV的一个新的Andr​​oid项目我有、麻烦、项目、OpenCV

由网友(不要你从深情到敷衍*)分享简介:我做了修改,在Android的几个例子OpenCV的项目,但我有一个新的Andr​​oid项目中使用OpenCV的成功的一些问题。 的documentation使用OpenCV的与Android 说要完成以下步骤添加OpenCV的一个Android项目 - 确保Android项目是在同一个工作空间的OpenCV 转...

我做了修改,在Android的几个例子OpenCV的项目,但我有一个新的Andr​​oid项目中使用OpenCV的成功的一些问题。

的documentation使用OpenCV的与Android 说要完成以下步骤添加OpenCV的一个Android项目 -

确保Android项目是在同一个工作空间的OpenCV 转到属性>安卓>库添加引用OpenCV的项目>添加并选择OpenCV库项目

我按照这两个步骤,但是当我编译我的应用程序接收控制台错误 -

  

找不到OpenCV的-2.3.1.apk!

解决方案

在创建一个新的Andr​​oid项目,你需要做的唯一事情是

转到属性>安卓>图书馆>添加,选择OpenCV的库项目添加引用OpenCV的项目

您不应该再明确添加OpenCV库项目到新的Andr​​oid项目的构建路径:

转到属性> Java构建路径>项目再添参考OpenCV的项目>添加...

如果你这样做后一步,你会得到确切的错误找不到OpenCV的-2.3.1.apk!的问题描述。

检查出新的Andr​​oid项目的构建路径,并删除OpenCV的项目,如果它存在,然后给它一个尝试,看看是否有所帮助。

I have made modifications to several example OpenCV projects within Android, however I am having some issues with using OpenCV successfully in a new Android project.

The documentation on using OpenCV with Android says to complete the following steps to add OpenCV to an Android project -

ensure the Android project is in the same workspace as OpenCV add a reference to the OpenCV project by going to Properties > Android > Library > Add and choosing the OpenCV Library project

I have followed both of these steps, however when I compile my application I receive the console error -

Could not find OpenCV-2.3.1.apk!

解决方案

When creating a new Android project, the only thing you need to do is

add a reference to the OpenCV project by going to Properties > Android > Library > Add and choosing the OpenCV Library project

You should not then explicitly add OpenCV Library project into your new Android project's build path:

add another reference to the OpenCV project by going to Properties > Java Build Path > Projects > add...

If you do latter step, you will get the exact error Could not find OpenCV-2.3.1.apk! described in the question.

Check out the New Android project's build path and remove OpenCV project if it exists, then give it another try and see if this helps.

阅读全文

相关推荐

最新文章