我讨厌听起来像一个 n00b,但我已经尝试了几个小时来解决这个问题,并且真的可以使用一些帮助。通过使用此处提供的 javacv.jar 和 javacpp.jar,我已经成功地能够在我的 Android 应用程序中使用 FFmpeg 和 OpenCV 。这一直很好,但是javacv和javacpp发生了一些变化,我需要为我的应用程序重建这些。我已将这两个存储库检出到我的主目录中。我的主目录中也有 opencv-2.4.4。我能够通过在 javacpp 目录中运行“mvn install”来编译 javacpp 并获得一个 jar 文件。当我尝试在我的 javacv 目录中执行此操作时,我收到此错误:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building JavaCV
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:properties {execution: properties}]
[INFO] [dependency:copy-dependencies {execution: copy-dependencies}]
[INFO] javacpp-0.4.jar already exists in destination.
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [exec:exec {execution: javacpp}]
Generating source file: /home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/jnicvkernels.cpp
Building library file: /home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/linux- x86_64/libjnicvkernels.so
g++ -I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/include/linux -I/usr/local/include /home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/jnicvkernels.cpp -msse3 -ffast-math -Wl,-rpath,$ORIGIN/ -march=x86-64 -m64 -Wall -O3 -fPIC -shared -s -o /home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/linux-x86_64/libjnicvkernels.so - L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/jamvm -Wl,-rpath,/usr/lib/jvm/java-7-openjdk- amd64/jre/lib/amd64/jamvm -ljvm
In file included from /home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/jnicvkernels.cpp:58:0:
/home/marwfair/javacv/target/classes/com/googlecode/javacv/cpp/cvkernels.h:22:33: fatal error: opencv2/core/core_c.h: No such file or directory
compilation terminated.
我已经阅读了适用于 Android 的 javacpp 的文档和适用于 javacv 的文档。我正在运行 Ubuntu,并且对 Maven 很陌生。任何帮助将不胜感激。我觉得我真的错过了一些关键点。