Eclipse中没有响应:文件 - >导入 - >现有项目到工作区

时间:2022-02-24 21:12:12

I'm trying to import one of the GWT samples into Eclipse by following the instructions below. But when I browse to the directory containing the "Hello" sample and uncheck "Copy projects into workspace", the Finish button is grayed out, preventing me from completing the import. Any ideas why?

我正在尝试按照以下说明将其中一个GWT示例导入Eclipse。但是当我浏览到包含“Hello”示例的目录并取消选中“将项目复制到工作空间”时,“完成”按钮显示为灰色,导致我无法完成导入。有什么想法吗?

-- Option A: Import your project into Eclipse (recommended) --

- 选项A:将项目导入Eclipse(推荐) -

If you use Eclipse, you can simply import the generated project into Eclipse. We've tested against Eclipse 3.3 and 3.4. Later versions will likely also work, earlier versions may not.

如果使用Eclipse,则只需将生成的项目导入Eclipse即可。我们已经针对Eclipse 3.3和3.4进行了测试。更高版本可能也可以使用,早期版本可能不会。

In Eclipse, go to the File menu and choose:

在Eclipse中,转到“文件”菜单并选择:

File -> Import... -> Existing Projects into Workspace

文件 - >导入... - >现有项目到工作区

Browse to the directory containing this file, select "Hello". Be sure to uncheck "Copy projects into workspace" if it is checked. Click Finish.

浏览到包含该文件的目录,选择“Hello”。如果选中,请务必取消选中“将项目复制到工作区”。单击完成。

4 个解决方案

#1


I had the same problem but found this:

我有同样的问题但发现了这个:

I just tried this on Eclipse 3.4 1) Create a project named "Showcase" file > new > project

我刚刚在Eclipse 3.4上尝试过这个.1)创建一个名为“Showcase”文件> new>项目的项目

2) Import the Showcase files right-click on the project name

2)导入Showcase文件,右键单击项目名称

Import File System From Directory (browse to your eclipse samples installation) Showcase (select the directory in the left panel) Into folder (Showcase should be the default value)

从目录导入文件系统(浏览到您的eclipse示例安装)Showcase(选择左侧面板中的目录)Into文件夹(Showcase应该是默认值)

This will import the source into your workspace. Use build.xml to build the project. The build will fail as the gwt-servlet.jar is in a shared directory which doesn't get brought into the project via this method.

这会将源导入您的工作区。使用build.xml构建项目。构建将失败,因为gwt-servlet.jar位于共享目录中,该目录不会通过此方法进入项目。

#2


I also encountered this problem but got through it using following steps.

我也遇到过这个问题,但是使用了以下步骤。

First open up a command prompt and go inside to the project folder using cd command.

首先打开命令提示符,然后使用cd命令进入项目文件夹。

then execute this command in there. Be sure to install apache ant before doing this.

然后在那里执行此命令。在执行此操作之前,请务必安装apache ant。

ant eclipse.generate

this will generate .classpath and .project files

这将生成.classpath和.project文件

now you can import the project into the workspace just as normal way. file->import->general->existing project

现在您可以像平常一样将项目导入工作区。 file-> import-> general->现有项目

#3


To import the samples from the Android SDK into Eclipse, do the following:

要将Android SDK中的示例导入Eclipse,请执行以下操作:

  1. Click File->New->New Android Project
  2. 单击文件 - >新建 - >新建Android项目

  3. Select 'Create project from existing sample'
  4. 选择“从现有样本创建项目”

  5. Select your Build Target (The Android API level)
  6. 选择您的Build Target(Android API级别)

  7. Select the sample app you want.
  8. 选择所需的示例应用程序。

  9. Finish.

This is valid for Eclipse 3.5.2.

这对Eclipse 3.5.2有效。

BTW: Link in previous answer is broken.

BTW:先前答案中的链接已被破坏。

#4


after importing right click on the project ->Goolge->web toolkit setting->click yes the check box and then run as a web application!

导入后右键单击项目 - > Goolge-> web toolkit setting->单击是复选框,然后作为Web应用程序运行!

#1


I had the same problem but found this:

我有同样的问题但发现了这个:

I just tried this on Eclipse 3.4 1) Create a project named "Showcase" file > new > project

我刚刚在Eclipse 3.4上尝试过这个.1)创建一个名为“Showcase”文件> new>项目的项目

2) Import the Showcase files right-click on the project name

2)导入Showcase文件,右键单击项目名称

Import File System From Directory (browse to your eclipse samples installation) Showcase (select the directory in the left panel) Into folder (Showcase should be the default value)

从目录导入文件系统(浏览到您的eclipse示例安装)Showcase(选择左侧面板中的目录)Into文件夹(Showcase应该是默认值)

This will import the source into your workspace. Use build.xml to build the project. The build will fail as the gwt-servlet.jar is in a shared directory which doesn't get brought into the project via this method.

这会将源导入您的工作区。使用build.xml构建项目。构建将失败,因为gwt-servlet.jar位于共享目录中,该目录不会通过此方法进入项目。

#2


I also encountered this problem but got through it using following steps.

我也遇到过这个问题,但是使用了以下步骤。

First open up a command prompt and go inside to the project folder using cd command.

首先打开命令提示符,然后使用cd命令进入项目文件夹。

then execute this command in there. Be sure to install apache ant before doing this.

然后在那里执行此命令。在执行此操作之前,请务必安装apache ant。

ant eclipse.generate

this will generate .classpath and .project files

这将生成.classpath和.project文件

now you can import the project into the workspace just as normal way. file->import->general->existing project

现在您可以像平常一样将项目导入工作区。 file-> import-> general->现有项目

#3


To import the samples from the Android SDK into Eclipse, do the following:

要将Android SDK中的示例导入Eclipse,请执行以下操作:

  1. Click File->New->New Android Project
  2. 单击文件 - >新建 - >新建Android项目

  3. Select 'Create project from existing sample'
  4. 选择“从现有样本创建项目”

  5. Select your Build Target (The Android API level)
  6. 选择您的Build Target(Android API级别)

  7. Select the sample app you want.
  8. 选择所需的示例应用程序。

  9. Finish.

This is valid for Eclipse 3.5.2.

这对Eclipse 3.5.2有效。

BTW: Link in previous answer is broken.

BTW:先前答案中的链接已被破坏。

#4


after importing right click on the project ->Goolge->web toolkit setting->click yes the check box and then run as a web application!

导入后右键单击项目 - > Goolge-> web toolkit setting->单击是复选框,然后作为Web应用程序运行!