Reputation: 33871
Eclipse is really bugging me with this. I have an Android project that is not in the workspace. Since Android projects don't work correctly if you use Eclipse's Import>existing project you have to make a new Android project from a folder on disk. If this folder is in your workspace, it won't work. If it isn't it works, but then the project is located outside of my workspace folder, which is irritating. Does anyone know a way around this?
Upvotes: 11
Views: 8753
Reputation: 1
Also you must delete the current install on your phone or you will get a signature fail from other comps install of the same app. So do the above and uninstall app off your phone before running the app on the new computer.
Upvotes: 0
Reputation: 510
You can fix this by following this alternative import flow:
This will properly import your Android project.
Upvotes: 12
Reputation: 10789
I've experienced this problem too, when, for example, I tried to create a new android project based on existing source (the Notepad Exercise 1 example program that the android developer's documentation provides). I believe the problem you are experiencing with Import not working is that what you are trying to import a "project" that isn't really an Eclipse project at all (e.g. no .project/.classpath - it's just source code with a directory structure that deceptively looks like a project).
Like cisteams has alluded to above, if this is the problem, the procedure around this goes something like this:
And you should be done. You can go back now and delete the copy of the project that isn't in your workspace to avoid confusion later on.
Upvotes: 4
Reputation: 2508
What version of Eclipse and ADT are you using?
Currently this approach is working fine for importing projects that are checked out from SVN. It does require that you have a .project and .classpath files (normally they are checked in to revision control).
If you do not have these files (some open source examples don't include them) then you need to use the Android Wizard for creating a new Android project from existing source. The key here is that it is a New not an Import, so yes it doesn't like it if the files are in the workspace. What you can do is create the new project externally using the wizard to create the .project and .classpath files. Once those exist you can use the normal import to bring the files into your workspace (and check those missing files into your source control).
Upvotes: 0