1

我是 Android 上的 OpenCV 新手。现在,我正在尝试在我的 MacOSX 上配置它。

我遵循这些说明: http: //www.stanford.edu/class/ee368/Android/Tutorial-2-OpenCV-for-Android-Setup-Macintosh.pdf

当我使用此命令到达此步骤(将 JNI 构建到 OpenCV 库)时:

sh ./project_create.sh 

控制台显示此错误报告。

Error: The project either has no target set or the target is invalid.
Please provide a --target to the 'android update' command.

如何设置目标。它是否与 local.env.mk 文件有关。如果是这样,这就是里面的内容:

#location of android-opencv.mk file that was generated by the cmake build
#of opencv for android
OPENCV_CONFIG=../build/android-opencv.mk

#the root directory of the crystax r4 ndk - ndk-build should be in this dir
#you can download the ndk from http://www.crystax.net/android/ndk-r4.php
#ANDROID_NDK_ROOT=$(HOME)/android-ndk-r4-crystax
ANDROID_NDK_ROOT=/Users/farissyariati/android-ndk-r4-crystax/
#define only armeabi-v7a to make the final apk smaller or armeabi
ARM_TARGETS="armeabi armeabi-v7a"

谢谢你。

4

3 回答 3

2
于 2012-08-14T17:41:21.567 回答
1

当前目标平台数量取决于下载的 SDK 数量。请执行以下命令以确保您设置了正确的目标平台:

android list target
于 2012-11-23T07:34:05.403 回答
0

我用了这个命令

->$Android list target:
id: 1 or "android-21"
     Name: Android 5.0
     Type: Platform
     API level: 21
     Revision: 1
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : android-tv/armeabi-v7a, android-tv/x86, default/armeabi-v7a, default/x86, default/x86_64

我已经在命令“”上设置了这个选项,android update project -t 1 -p . -s直到这里一切都好,但是当我执行 ./setup_env.sh 时,我遇到了同样的问题:错误:项目要么没有目标集,要么目标无效。请提供a --target to the 'android update'命令。

某人,请o/

于 2014-11-13T14:58:57.330 回答