How to import android project properly into Eclips

2019-07-24 05:57发布

问题:

I tried many answers there but non solved the problem.

I have an android project (lets name it t) that I created using the eclipse into its workspace folder.

I did the following:

  • I copied t into another place as a backup.
  • Then, I deleted it from eclipse -> R-click on t then delete.
  • When I checked the workspace, it was removed as expected.
    Then.
  • I copied the backup into the workspace.
  • I tried to open it on eclipse, but with no success.
    • File -> Import -> Android -> Existing Android Code Into WorkSpace -> Next -> Browse (to the project folder in the workspace itself) -> Finish (Last step).
  • After the last step, the dialog box disappeared (as expected) without a warning message. But t was not added (became visible) into the Package Explorer of Eclipse!!.
  • I checked the workspace folder, the project t I wanted to open was still there

How to fix?

回答1:

Try leaving the project folder outside of the workspace during the import.

When you re-import the project, check the "copy project files into workspace" box.

In my experience, manually copying projects into (or out of) the workspace can be troublesome.



回答2:

New ->Other ->Android Project from Existing Code ->(Browse to Root Directory )->select Projects to Imports -> check Copy projects into working sets ->finish



回答3:

I think that you should check the error log...probably Eclipse won't let you import it, with a message "Some projects cannot be imported because they already exist in the workspace". If this is the case, using/creating another workspace should fix the problem. If you don't want to change workspace, you may want to check this post.