构建路径 4.0 android,opencv4android:构建路径不完整(opencv4android : build path is incomplete)...

opencv4android:构建路径不完整(opencv4android : build path is incomplete)

我正在尝试使用eclipse在我的mac上编译opencv4android库2.4.10,以获得运行样本。 经过很多麻烦后,我成功地编译了本机代码。 但之后我收到了这个错误:

该项目未构建,因为其构建路径不完整。 找不到java.lang.Object的类文件。 修复构建路径然后尝试构建此项目OpenCV库 - 2.4.10未知Java问题。

我试图通过转到“项目属性 - > java构建路径 - >库”来手动添加JRE,并编辑有问题的库(无法获取项目的系统库)。 但每次我尝试编辑时,我唯一的选择是opencv库2.4.10 - 与项目本身相同,我不能用适当的JRE替换它。

知道怎么解决这个问题?

I am trying to compile opencv4android library 2.4.10 on my mac using eclipse, to get to run samples. after going through a lot of trouble, I have been successful with compiling native code. But after that I get this error:

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.10 Unknown Java Problem.

I have tried to manually add JRE by going to "project properties -> java build path -> libraries" and edit the problematic library(unable to get system library for the project). But each time I try to edit that the only option I have is opencv library 2.4.10 - the same as project itself and I can't replace that with proper JRE.

Any idea how can I fix this?

原文:https://stackoverflow.com/questions/27274419

更新时间:2019-12-09 18:18

最满意答案

我认为您尚未安装相应的Android SDK平台:错误消息中引用了9和11。 本文档介绍了如何通过下载更多组件来正确设置Android SDK。

但是,没有必要下载所有缺少的SDK。 您可以在例如15-puzzle目录的project.properties文件中修改已安装的目标(至少目标8)所需的目标。

It seems that the problem was originating from my lack of experience in using native code in an application. what happened was, when importing and setting up the library project, eclipse automatically changed to C/C++ perspective. in which it wouldn't compile the application. as soon as I found out and change the perspective everything worked properly. as simple as that!

相关问答

看来你缺少JDK(java.lang.Object来自那里) 问题是您在不同的PC上使用相同的Android API。 使用不同但具有相同API的路径名丢失了Eclipse。 要解决它,首先重新选择Android API版本(设置为另一个并且有效,然后恢复您需要并验证它 - >它将强制Eclipse重新加载API)。 然后进入project-> properties-> java构建路径。 然后删除“无法获取项目的系统库”,然后删除“添加库”,并选择“Android类路径容器”。 It seems

...

看起来你的com.dao.StudentDaoImpl类实际上是在com.dao其他一些包中。 或者类名不同,你说spring.xml StudentDao the class exists但是你在spring.xml使用了spring.xml名。 所以检查包和类名。 It looks like your com.dao.StudentDaoImpl class is in reality in some other package than com.dao. Or the class name

...

我认为您尚未安装相应的Android SDK平台:错误消息中引用了9和11。 本文档介绍了如何通过下载更多组件来正确设置Android SDK。 但是,没有必要下载所有缺少的SDK。 您可以在例如15-puzzle目录的project.properties文件中修改已安装的目标(至少目标8)所需的目标。 It seems that the problem was originating from my lack of experience in using native code in an ap

...

我解决了我的问题。 我做了一个文件>切换工作区,并切换到另一个工作区,其中有一个不同的项目。 然后我切换回原来的工作区,一切都很好。 因此,我们可以将这一点加入很长的民间补救措施清单中,这些清单包括与Eclipse相关的各种奇怪错误附带的软件知识,以及其他各种各样的民间疗法,秘方,老太太故事,迷信等等。 我当然希望Android Studio比这更好! I fixed my problem. I did a File>Switch Workspace and switched to another

...

这只是打印出URL的“路径”部分(在网址之后) 试试这个以显示正在发生的事情,我认为url中还有一个toString,它允许你用url打印整个东西 URL url = new URL("http://google.com/example");

System.out.println(url.getHost());

System.out.println(url.getPath());

System.out.println(url.getHost() + url.getPath());

这输出 goo

...

我遇到了同样的问题 - 我不需要切换到OpenCV4Android 2.4.8,但删除我的2.4.9目录并重新解压缩并从头开始执行步骤似乎解决了所有问题。 我确定我刚刚损坏了一些文件,并重新解压缩我的SDK修复它。 长话短说: 确保按照教程中的每个步骤操作: http : //docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html 确保在从SDK目录的ROOT导入示例项目时 - 而不是从示例目录导

...

它说明了一切:你的课程路径中缺少一个库。 尝试从此处下载jar并将其添加到类路径中。 如果您正在使用maven,gradle等,甚至更简单,只需使用上一个链接中为每个工具提供的代码即可。 It says it all: there's a missing library in your class path. Try downloading the jar from here and add it to your class path. If you're using maven, gradle,

...

正如OP的帖子评论讨论中所提到的(所有信用都是他们),问题在于列表l : List l = new ArrayList();

for (int i = 0; i < pts_1.length; i++) {

Point pt = new Point(pts_1[0][i], pts_1[1][i]);

l.add(i,pt);

}

Mat mat1 = Converters.vector_Point2f_to_Mat(l);

如果我们看一下List

...

当启动一个新的终端窗口时,shell会自动执行/etc/profile和/etc/bashrc_Apple_Terminal (或不使用终端时的/etc/bashrc )。 /etc/profile是运行/usr/libexec/path_helper -s ,除了使用Environment.GetEnvironmentVariable("Path")时也看到的“默认”元素之外,它还构建一个路径命令,为路径添加其他元素。 Environment.GetEnvironmentVariable("Pa

...

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值