0

I ma trying to open the source code of Gallery2 application in of Android in Eclipse and for some reason I am not able to open it.

I did Open> Android project from the existing code and selected the Gallery2 folder that I downloaded. As soon as I do that, i see the following screen:

enter image description here

As we can see that next button is disabled, Finish button is disabled and it says "Select atleast one project even though the project is selected". I am not sure what to do.

Or let me ask the question another way. I have successfully imported project into my workspace. What do I do now? I am fron Visual Studio world and ideally I should be looking for a solution file and that will open the entire project. How does that happen with java Android file?

Any ideas?

Lost
  • 12,007
  • 32
  • 121
  • 193

3 Answers3

2

Because there is already project whose name is same GalleryActivity/Gallery2 or project which have same package name already imported in your eclipse workspace.

Check all the imported projects in your eclipse project explorer

Ajay S
  • 48,003
  • 27
  • 91
  • 111
  • At this point there is only one folder in my workspace and that is Gallery2 – Lost Feb 18 '14 at 18:04
  • @TGMCians No, that's wrong. There would be a warning saying `Some projects cannot be imported because they already exist in the workspace` if that was the reason. – FD_ Feb 18 '14 at 18:04
  • @Californicated, Remove the existing project then try to import – Ajay S Feb 18 '14 at 18:06
  • @Californicated, You can see your java files in your project explorer. Learn from here http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.user/reference/ref-27.htm – Ajay S Feb 18 '14 at 18:11
  • @TGMCians you're right. Strange to see two different messages for the same error. – FD_ Feb 18 '14 at 18:12
  • https://android.googlesource.com/platform/packages/apps/Gallery2/ This is the code that I am trying to compile. I am not sure if I am doing something wrong or code has some issues. Can Anyone try to pull and open the code in Eclipse? – Lost Feb 18 '14 at 18:22
1

This similiar error happened to me when I imported a standard Java project, I knew it was a java project but Eclipse didn't think so. It turned out that my project was missing the project.properties file and because of that Eclipse didn't recognize my project as a Java project. In the end I imported it as default project and added java facets to it, that did the trick. I don't know if this is your case but it may be worth to have a look at it, eclipse is a bit pedantic when it comes to things like this.

Robert
  • 4,602
  • 4
  • 22
  • 33
0

you have already imported same named project in your workspace. so first check your workspace and if exists delete it. or create another workspace and try to import the project

java seeker
  • 1,246
  • 10
  • 13
  • At this point there is only one folder in my workspace and that is Galler2 – Lost Feb 18 '14 at 18:03
  • I added more comments into my question. Since I have already imported the project in the workspace, I am actually wanting to open that code for compilation. – Lost Feb 18 '14 at 18:10