3

首先:我不确定它是否适合这样的问题,所以如果您认为有更多合适的空间,请移动它。

我有一些基于 GAE 的项目需要导入 Eclipse。我下载了新版本的 Eclipse EE (Kepler) 并安装了 App Engine 插件。然后我从源代码创建了一个新项目并尝试对其进行配置......这就是问题开始的地方。

当我尝试构建项目时,出现 3 个错误:

The App Engine SDK '\incap-ii\build\web\WEB-INF\lib\appengine-api-1.0-sdk-1.8.0.jar' on the project's build path is not valid (SDK directory 'D:\incap-ii\build\web\WEB-INF\lib\appengine-api-1.0-sdk-1.8.0.jar' does not exist)    incap-ii        Unknown Google App Engine Problem
Project 'incap-ii' is missing required library: 'war/WEB-INF/lib/jsr107cache-1.1.jar'   incap-ii        Build path  Build Path Problem
The project cannot be built until build path errors are resolved    incap-ii        Unknown Java Problem

第一个错误说找不到某些 jar 文件,但显示的路径很奇怪。实际上它缺少指向工作区(D:\workspaces\eclipse GAE\)的部分 - 休息,从 incap-ii 开始就可以了。我尝试配置构建路径或更改 SDK 路径:

配置

如您所见,我在配置中有 2 个 SDK。但是,我无法更改此项目中使用的那个:我从列表中选择 appengine-java-1.8.5 - 1.8.5,单击确定,对话框窗口关闭但错误仍然存​​在,一旦我再次打开对话框,我就会看到更改未保存(仍然使用错误的)。

我应该更改某些特定配置吗?

[编辑] 更多解释/屏幕(下)。正如您在第 1 号屏幕上看到的那样,我 (preferences\google\appengine) 我配置了 2 个 appEgines:一个是我手动下载和提取的(在屏幕上检查),另一个是由 Google App Engine 插件下载的。无论如何,当我现在检查项目首选项时,我看到 3 个引擎(屏幕 2) - 额外的一个(选定的)在项目目录中。正如我所说,我无法更改它,因为单击“确定”后,更改不会保存。但是,当我打开“配置 SDK”(屏幕 3)时,我只能看到两个外部引擎。我勒个去?我试图重新安装整个 Eclipse,但它没有帮助......而且,当我使用 Netbeans 构建它并从 shell 运行时,我可以使用手动下载的 AppEngine 运行这个项目,所以引擎可能很好......

  1. 在此处输入图像描述
  2. 在此处输入图像描述
  3. 在此处输入图像描述
4

2 回答 2

11

我遇到的一个问题可能和你的一样。就我而言,Eclipse 说:

App Engine SDK 'C:\Users\Takahiko.m2\repository\com\google\appengine\appengine-api-1.0-sdk\1.8.8\appengine-api-1.0-sdk-1.8.8.jar'项目的构建路径无效(SDK 位置 'C:\Users\Takahiko.m2\repository\com\google\appengine\appengine-api-1.0-sdk\1.8.8\appengine-api-1.0-sdk-1.8.8 .jar' 不是目录)

这意味着 Eclipse 在搜索 App Engine SDK 的安装目录之前,在本地 maven 存储库 (~/.m2/repository) 中找到了 App Engine SDK 二进制文件。

(1)在 Eclipse 中关闭您的项目。

(2) 使用文本编辑器打开项目的 .classpath,如果它包含与 App Engine 相关的类路径条目,如下所示:

<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/shared/appengine-local-runtime-shared.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/shared/el-api.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/shared/jsp/repackaged-appengine-ant-1.7.1.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/shared/jsp/repackaged-appengine-ant-launcher-1.7.1.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/shared/jsp/repackaged-appengine-jasper-6.0.29.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/shared/jsp/repackaged-appengine-jasper-el-6.0.29.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/shared/jsp/repackaged-appengine-tomcat-juli-6.0.29.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/shared/jsp-api.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/shared/servlet-api.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/appengine-tools-api.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/appengine-api-labs/v1/appengine-api-labs.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/appengine-endpoints/v1/appengine-endpoints-deps.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/appengine-endpoints/v1/appengine-endpoints.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/datanucleus/v2/asm-4.0.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/datanucleus/v2/datanucleus-api-jdo-3.1.3.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/datanucleus/v2/datanucleus-api-jpa-3.1.3.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/datanucleus/v2/datanucleus-appengine-2.1.2.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/datanucleus/v2/datanucleus-core-3.1.3.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/datanucleus/v2/geronimo-jpa_2.0_spec-1.0.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/datanucleus/v2/jdo-api-3.0.1.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/datanucleus/v2/jta-1.1.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/jsr107/v1/appengine-jsr107cache-1.8.8.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/opt/user/jsr107/v1/jsr107cache-1.1.jar">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/lib/user/appengine-api-1.0-sdk-1.8.8.jar" sourcepath="C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/src/user/appengine-api-1.0-sdk-1.8.8-src.zip">
    <attributes>
        <attribute name="javadoc_location" value="file:/C:/Eclipse/eclipse-juno/plugins/com.google.appengine.eclipse.sdkbundle_1.8.8/appengine-java-sdk-1.8.8/docs/javadoc/"/>
    </attributes>
</classpathentry>

(3) 删除所有的classpathentry(与App Engine jar 文件相关)。

(4)在 MAVEN2_CLASSPATH_CONTAINER 之前添加GAE_CONTAINER。

<classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/>

(5) 重新打开你的项目

于 2014-01-04T02:34:48.320 回答
1

您的 SDK 配置似乎有问题。

您的屏幕截图显示了您的项目的配置,但我认为您需要查看首选项-> 谷歌-> 应用程序引擎,并检查您的 SDK 的配置。我认为您无法为您的项目选择的那个很可能会在那里显示错误,但无论哪种方式,您都可能希望删除并重新添加它并确保其路径有效。

于 2013-10-05T22:33:20.293 回答