the simple answer to this question is *.* , basically it's completely safe to ignore anything you don't want to add to version control. that being said it really depends on what you're looking to accomplish by using git. if you want to be able to checkout/import your project elsewhere from the same repository then you'll want to ignore at most /bin/. and /gen/., i wouldn't ignore the folders themselves (i.e. /bin, /gen) just for the sake of maintaining the proper directory structure for your project.

that answers the initial question, but is unrelated to the problem you are having. as far as solving the problem you are experiencing is concerned you would have to post more info, specifically what's listed in the problems tab. if you can't see the problems tab anywhere then click on the window menu, then show view, then choose problems if it's there or click on other and look under general to find it.


the best way is use this site to generate:


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.


best solution today is probably to generate the exact .gitignore file you need. just go to

the project is also on github:


what i usually add to .gitignore is:


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).


there are file types to ignore

# built application files

# files for the dex vm

# java class files

# generated files

# local configuration file (sdk path, etc)

# eclipse project files

# proguard folder generated by eclipse

# intellij project files

from gitignore on github

Related Query

More Query from same tag