首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Eclipse上安装OpenCV for Android的问题:各种错误,包括“在路径中找不到”

在Eclipse上安装OpenCV for Android的问题:各种错误,包括“在路径中找不到”
EN

Stack Overflow用户
提问于 2014-06-13 20:24:13
回答 1查看 1.5K关注 0票数 0

我正在尝试在Eclipse (Windows8)上安装OpenCV for Android。我遵循了这里的教程:http://www.youtube.com/watch?v=N2onPuDZQVY一步一步,但当我尝试构建任何示例项目时,仍然会遇到错误。以下是我在控制台中得到的错误:

代码语言:javascript
复制
16:10:33 **** Incremental Build of configuration Default for project OpenCV Sample - 15         puzzle ****
"C:\\Dev\\android-ndk-r9d\\ndk-build.cmd" all 
Android NDK: WARNING: APP_PLATFORM android-9 is larger than android:minSdkVersion 8 in     ./AndroidManifest.xml    
C:/Dev/android-ndk-r9d/build/core/add-application.mk:187: *** Android NDK: Aborting...    .  Stop.
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk    

我在"Problems“选项卡中看到了以下内容:

代码语言:javascript
复制
Description Resource    Path    Location    Type
The type java.lang.Object cannot be resolved. It is indirectly referenced from required     .class files    Video.java  /OpenCV Library - 2.4.9/src/org/opencv/video    line 1      Java Problem

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

Unable to resolve target 'android-14'   OpenCV Library - 2.4.9      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.9      Unknown Java Problem

Unable to resolve target 'android-11'   OpenCV Sample - face-detection          Unknown Android Target Problem

The container 'Android Dependencies' references non existing library 'C:\Dev\OpenCV-    2.4.9-android-sdk\sdk\java\bin\opencv library - 2.4.9.jar'  OpenCV Sample - camera-    calibration      Build path  Build Path Problem

Invalid project path: Include path not found (\sources\cxx-stl\gnu-    libstdc++\4.6\libs\armeabi-v7a\include). OpenCV Sample - face-detection          pathentry   Path Entry Problem

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

Invalid project path: Include path not found (\sources\cxx-stl\gnu-    libstdc++\4.6\include).  OpenCV Sample - face-detection      pathentry   Path Entry     Problem

Program "\ndk-build.cmd" not found in PATH  OpenCV Sample - face-detection              C/C++ Problem

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

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

The container 'Android Dependencies' references non existing library 'C:\Dev\OpenCV-    2.4.9-android-sdk\sdk\java\bin\opencv library - 2.4.9.jar'  OpenCV Sample - face-    detection      Build path  Build Path Problem

Unable to resolve target 'android-11'   OpenCV Sample - camera-calibration          Unknown Android Target Problem

Invalid project path: Include path not found (\platforms\android-9\arch-    arm\usr\include).   OpenCV Sample - face-detection      pathentry   Path Entry     Problem

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

*** Android NDK: Aborting...    .  Stop.    OpenCV Sample - 15 puzzle         line 187, external location: C:\Dev\android-ndk-r9d\build\core\add-application.mk   C/C++ Problem

我哪里错了?我的C/C++构建命令是:${NDKROOT}\ndk-build.cmd,我使用包含ndk-build.cmd文件的文件夹的完整路径正确定义了环境变量。如果我还需要提供任何其他信息,请告诉我。任何帮助都将不胜感激--这件事已经困扰我整整一周了!

EN

回答 1

Stack Overflow用户

发布于 2016-08-20 12:51:58

也许你可以在http://johnhany.net/2014/04/using-opencv-on-android/上找到一些会议。点击C/C++常规->路径和符号->包含,在GNU C++中添加如下路径:

代码语言:javascript
复制
            ${NDKROOT}/platforms/android-15/arch-arm/usr/include

            ${NDKROOT}/sources/cxx-stl/gnu-libstdc++/4.6/include

            ${NDKROOT}/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include

在我的ndk r12b中没有4.6路径。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24205220

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档