views:

239

answers:

2

What files/folders can I safely ignore for inclusion with git?

I copied a good project, removed its gen and bin folders and tried to run the app. The Android Launch window says, "Your project contains error(s), please fix them before running your application. There is a red X on the icon to the left of the project in the Package Explorer. While the gen folder does not exist in Windows Explorer, it does in Package Explorer.

As you can see, I'm new to all this. Any suggestions?

Thanks, Lars

+4  A: 

What I usually add to .gitignore is:

bin
gen

bin and gen are constantly changed while coding, so there's no need to include them into the Git repository. Also, sometimes I add .classpath and .project which are Eclipse specific files, because maybe I want to create a new Android project based on these same sources, but in another OS or IDE.

With regards to the error, I would clean the project and/or try to run the Fix Project Properties utility (right-click on the Project -> Android Tools -> Fix Project Properties).

Cristian
Thanks, this resolved issue.
+1  A: 

It's safe to ignore bin and gen, without problems. When I have problems with a project setup, I do this: First - have you looked at the 'Problems' tab in the view underneath the editor view - it generally gives more detailed information about project errors. If there's nothing conclusive there, I do the things below:

  1. Generally, when I'm having issues with Eclipse giving me phantom errors in the project, cleaning the project will fix it. It's in the menu, under Project>Clean.
  2. If that doesn't work, I'll usually try right clicking the project, going to Android Tools> Fix project properties.
  3. My last resort it to restart eclipse and delete the gen folder.
QRohlf
Thanks, this resolved issue.