我有一些麻烦,添加OpenCV的一个新的Andr​​oid项目 [英] I'm having some trouble adding OpenCV to a new Android project

查看:103
本文介绍了我有一些麻烦,添加OpenCV的一个新的Andr​​oid项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

的<一个href="http://opencv.itseez.com/doc/tutorials/introduction/android_binary_package/android_binary_package.html">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.

这篇关于我有一些麻烦,添加OpenCV的一个新的Andr​​oid项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆