开发者

Refactor > Move overlaps the location of another project

开发者 https://www.devze.com 2023-02-13 03:45 出处:网络
I am trying to move an Android project to a difference directory in the workspace, using Refactor > Move.

I am trying to move an Android project to a difference directory in the workspace, using Refactor > Move.

The problem is that the "Move Project" dialog box keeps the OK button disabled, w开发者_开发技巧hile issuing the following message in red:

\winshare\sandbox\workspace\NewDirName overlaps the location of another project: NewDirName

The funny thing is... a directory named NewDirName doesn't even exist!

(I later tried creating such directory outside of Eclipse but that didn't help)

Any idea why this is?

I am using Eclipse 3.6.1 64-bit with the latest Android SDK 9 (under Windows 7).


  1. Delete the project. Do not delete resources from the filesystem.
  2. You can then rename the project folder outside of Eclipse (using command line or file manager GUI)
  3. Now import the project back into the workspace (File -> Import -> Existing Project into Workspace.

The error message you're getting is misleading. Refactoring operations are not intended for projects. The problem is that the plugin should remove the Refactor options when the selected item is a project rather than a package or class.


I stumbled over the same problem ("overlaps the location of another project" error) trying to create a new project for a set of tutorial files unpacked from a ZIP file. This problem appeared in a couple of forums so I'm cross-posting the answer so it's available in both.

I'm using Vista, Eclipse 3.7.0

I don't know what "File | New | Project | Android Project | Create project from existing source" is supposed to do but I couldn't get it to work for the above unzipped files. I kept getting that error.

I found what did work is: 1) Copy the unzipped file tree for the project to wherever you want it to eventually reside. 2) File | Import | General | Existing Projects into Workspace | Select root directory: and point it to wherever you put the zipped files, check-box on for the Project that is the one you want, then Finish

Step 2 seems to not actually move the files anywhere (even though the term 'import' implied that to me), but it seems to just make Eclipse aware of where the project is located and it uses the project from that directory.

That seems to work at least for me.


In my case with Eclipse 4.2, I had changed the folder structure from:

./workspace/%project_folder%

to ./2014/android-things/%project_folder% -> symlink ./workspace/%project_folder%

The new 2014 folder was actually a git repo. Workspace show no projects, and reimporting didn't worked - so I had to delete the symlink and renamed the project under android-things to fully qualified name org.domain.%project_folder% to avoid possible conflicts.

0

精彩评论

暂无评论...
验证码 换一张
取 消