构建库项目路径错误

构建库项目路径错误

本文介绍了构建库项目路径错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚升级我的Andr​​oid开发人员ENV到V15,我无法引用库项目。我有一个项目AppCore和其他项目的应用程序。 AppCore是库项目(属性 - > Android的 - >是库),而应用程序引用AppCore。(属性 - > Android的 - >库 - >添加;它显示在构建路径对话框的库选项卡)

I've just upgraded my Android dev env up to v15 and I'm unable to reference library projects. I have a project AppCore and another project App. AppCore is a library project (properties -> android -> Is Library), while App references AppCore (properties -> android -> libraries -> Add; it shows in the Libraries tab of the Build Path dialog).

AppCore编译没有问题,但应用程序不。它说:

AppCore compiles without problem, but App does not. It says:

这个项目不能建到构建路径错误被解决。

"The project cannot be built until build path errors are resolved"

然而,构建路径对话框不显示任何错误。

However, the Build Path dialog does not show any error.

这种事都与我创建了新项目和老项目,我在工作区(无需提及他们在升级之前工作过)。

It happens both with the new project I have created and with the old projects I had in the workspace (no need to mention that they worked before the upgrade).

我已经打开.classpath文件,并显示:

I've open the .classpath file and shows:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="src" path="gen"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
    <classpathentry kind="output" path="bin/classes"/>
</classpath>

很多试错后,我已删除的库线,并使其不再抱怨了构建路径错误,但当然他们声称有关用于从应用程序到AppCore缺课。但它告诉我,这个问题涉及到这一点。

After a lot of trial-error, I have removed the LIBRARIES line, and it no longer complains about the "build path errors", but of course it them claims about "missing classes" that are used from App to AppCore. But it tells me that the problem is related to that.

任何进一步的想法?任何提示吗?

Any further idea? Any hint?

推荐答案

部分修复找到了!

问题是,应用程序是字典序AppCore之前。所以,当工作区清洁,重建后...应用程序被编译,但AppCore的.jar文件不可用,因此它将失败。然后,AppCore是建的,但应用程序不重试。每当我手动重试一次大扫除构建周期,这个问题再次引起。

The problem is that App is lexicographically before AppCore. So, when the workspace is cleaned, a rebuild is done... App is compiled, but the .jar file of AppCore is not available, so it fails. Then, AppCore is built, but App is not retried. Whenever I manually retry a clean-build cycle, the problem raises again.

但是,如果我不干净的构建,但只是建立,它被编译。

But if I do not clean-build, but just build, it is compiled.

我仍然在试图弄清楚如何强制清理构建以特定的顺序。 preferences - >常规 - >工作空间 - >构建顺序似乎定义......但它仍然似乎被忽略

I'm still trying to figure how to force the clean-build in a particular order. preferences -> general -> workspace -> build order seems to define that... but it still seems to be ignored.

任何进一步的想法?

这篇关于构建库项目路径错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 06:48