views:

24

answers:

2

I'm trying to import an Android project into my Eclipse workspace, using existing source code. When I point Eclipse to my existing source location, it doesn't populate the Build Target area on the New Android Project dialog. Why isn't it letting me pick a build target?

A: 

Try right clicking the project, Android Tools -> Fix project properties

Falmarri
I have no project imported into Eclipse. That is what I'm trying to accomplish. I'm doing a File -> New -> Android Project, then selecting to 'Create project from existing source'.
Scienceprodigy
Don't do that. Import the project with file, import
Falmarri
If you want to add source, why would it populate the build target? It has no idea what you're doing. You're just adding source files. Create the project with the source, then do what I say in my answer.
Falmarri
Your suggestion doesn't work, it says unknown SDK location in the console. You need to specify the Android build target when you import from existing, for Android projects. The problem here is that Eclipse isn't letting me. It's supposed to give me a list of Android targets, but it isn't.
Scienceprodigy
+1  A: 

This is happening, because the path to the Android SDK on the pc where you got the source from is different on the one that you are trying to import it.

Angel
How can I fix this? Is it something in a properties file or something?
Scienceprodigy
You're probably better off creating a new project and then copy-pasting the source files
Falmarri
The path was actually not even set. I set it, and my problem was solved.
Scienceprodigy