Copying a project in same workspace [message #653492] |
Wed, 09 February 2011 18:12  |
Eclipse User |
|
|
|
Hi I'm relatively green on Eclipse, but I just wasted an hour on something I'd expect to be trivial, so I venture here before I waste anymore hours.
I want to make a copy of an Android project I'm working on so that I can work on the copy in parallell with the old. I did a copy-paste in the file system of the project folder and edited the copy of the .project file so that the project names differ. Then I used the File > Import to add the copied project to the existing workspace.
This failed. Now, none of the projects would compile because the compiler somehow tried to add files from Android.jar twice. This is a conclusion I draw based on the error message I got and what this post says about it. To fix the problem, I had to delete the copy of the project and the reference to the project deep down in the .metadata folder. It took a lot of Googling.
Now... How do I do it the proper way? How do I copy-paste a project without duplicating external references or whatever I did? How can this even happen, doesn't Eclipse treat two projects as two separate entites? How can references in one project affect the other?
Thanks for any input.
[Updated on: Wed, 09 February 2011 18:14] by Moderator
|
|
|
|
Re: Copying a project in same workspace [message #653622 is a reply to message #653519] |
Thu, 10 February 2011 08:07  |
Eclipse User |
|
|
|
Deepak Azad wrote on Wed, 09 February 2011 23:59 |
I am not sure about the Android specific stuff, but in general you can
add/remove libraries via the Java Build path dialog (right the project
and select Build path from the context menu)
|
Yes I'm aware of the build path stuff, and I checked that the .JAR file was only referenced once per project. The reason I post here and not on an Android forum is that it sounded like a general Eclipse problem (or me not understanding Eclipse properly).
I know I could probably circumvent the problem by creating a separate Workspace for each project, but that doesn't sound like the correct solution. It shouldn't be a problem with two Android projects in one workspace, should there?
How would you go about copying a project?
1. Create a new, blank project and then copy-pasting the java files into this?
2. Copy both the project and the java files like I did?
I haven't tried option 1 yet. I'll try that when I get back from work. Even if 1 works, I'd still like an explaination as to why option 2 didn't.
|
|
|
Powered by
FUDForum. Page generated in 0.06366 seconds