eclipse -restore missing projects

2020-08-09 07:30发布

问题:

For some unknown reason the projects that I created in a workspace are no longer listed in the package explorer tab. The actual files of the programs still exist on the flash drive which was the designated workspace. How do I correct this problem so that I can access the projects in this workspace?

回答1:

Create new project on the menu, then select the button "Create project from existing source" and select your project directory on disk.



回答2:

Are you in a different workspace? Try File > Switch Workspace or if you are in the right workspace already, you could try File > Import > General > Existing Projects into Workspace and re-import the projects.



回答3:

If you are working with Android projects, the straight import does not work. The fastest way I've found to deal with this issue is to move (not copy) the projects to a different location, then import them back into the workspace, making sure copying the files into the original workspace.

At this time, the Android eclipse plugin has a bug in it which will rename your projects to the package names, rather than using the "friendly" names you intended for the projects. Since eclipse quite often seems to drop projects in this way, this can lead to a great deal of frustration. If this bug is fixed, or you know of a workaround, I would appreciate hearing about it.



回答4:

I had a case where my project disappeared from the workspace and when I tried to import the existing project into workspace, Eclipse reported the project was already in the workspace! So I simply created a new project with the same name/location as the folder in which the project was located. This brought the project back to life in my worskpace. This worked in Kepler version of Eclipse.



回答5:

I found a way to resolve this issue without creating a new project.

My projects disappeared from the Package Explorer view when I was in the Java EE perspective. When I switched to the Java perspective, they reappeared in Package Explorer.

Version: Mars.2 Release (4.5.2) Build id: 20160218-0600

Not sure what caused this issue out of the blue and how long this solution will hold.



回答6:

A simple solution that requires deleting the affected projects from your workspace, then importing them again:

  1. Delete the affected projects from your workspace (do not delete from disk)
  2. Open the files. File >> Open Project from File System >> Select location of files >> Select projects to open.
  3. After you import them, it should work.


回答7:

Try a refresh (F5) of the workspace.



标签: eclipse