Git, Android, and Eclipse, build path issues resolved?
I recently started adding source revision control to my home project, and chose Git. I created a repository in my Eclipse project folder, at first only adding files under the src tree.
However after committing a change, next time I went to build I ran into a couple of issues.
MyApp/gen already exists but is not a source folder. Convert to a source folder or rename it.
and afterward clearing that
Errors running builder 'Android Resource Manager'
Checking the Java build path I noticed that the default add for the Android project wizard is a simple MyApp, and everything below it (assets, src, gen, etc.). My hunch was that the .git folder was getting added into this and the toolchain couldn't handle it, but adding exclusions didn't do the trick. As mentioned in other places (though not directly related to Git), if you modify the build path to just include the src and gen folders specifically, you can clear the two problems above with a delete of the gen folder and a clean build.
The upshot is that some files introduced by Git appear to break the standard resource builder, but fortunately there is a simple workaround.
Edit:
There is an issue with tumblr where I can't answer a question on my own blog, so I'm just going to modify the original post.
As torus points out, it may be better to add the gen folder to .gitignore list. This is probably a cleaner solution, as autogenerated code is one of several types we would never want to track in the repository (also I can think of local user preference files, intermediate files, etc.).









