Zach H
Zach H

Reputation: 257

Eclipse: Issues with deleting and creating projects

I am having an issue in Eclipse. If I create a project, then delete it and check the "Delete project contents on disk (cannot be undone)" check box, a project created afterwards with the exact same name and settings will not be created with a MainActivity.java file.

If I create a project then delete it without checking that box, it can be recreated with the MainActivity.java file but will require you to open and save the fragment_main XML file before the project can be deleted again (with or without checking the check box).

What is happening here? Why does it behave in this way?

Upvotes: 0

Views: 184

Answers (2)

josedlujan
josedlujan

Reputation: 5600

When you delete a Eclipse project this is what happens:

If you choose delete on disk - You delete the project and the files from the PC.

If you don't choose delete on disk - You only delete the project from eclipse but the files still there, so if you create a new project with the same name them put automatically.

For this case when you need some files from old projects, So, the best way is import or export projects.

I hope this help you.

Upvotes: 0

user285oo6
user285oo6

Reputation: 315

@Zach H When deleting a project give you two options(The dialog box will ask your confirmation for deleting from workspace or not)

  1. Simple Delete
  2. Delete from workspace

Under simple delete- As you delete a project then the project gets deleted in the Package Explorer but is still present in your workspace directory (i.e. the path where your projects are stored) because you didn't select delete from workspace option.

Under Delete from workspace- When you confirm the option delete from workspace then you project gets deleted from your hard disk as well.

When you simply choose delete then you can create a same project with same activity because the project with same name is not there in the package explorer. Only if the same project already exists then you will get an error asking you to rename your project.

The above said problem happens only when you have not installed the ADT/Eclipse properly(missing some files from the SDK Manager).

My suggestion for you is that you first install all the packages from the tools because a missing support tool could coz such problem as above

Upvotes: 1

Related Questions