Paul Wicks
Paul Wicks

Reputation: 65570

Storing Android eclipse projects in version control?

Ok, so I have an android project and a few related java projects in a directory (the workspace, essentially). I've added all of them to git. My .gitignore is as follows:

# OS Files
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db

#Android
# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/

# Local configuration file (sdk path, etc)
local.properties

#Java
*.class

# Eclipse
*.pydevproject
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath

# libgdx specific
*/libs/*

Now, when I try to check this out on another machine and import the eclipse projects into git there, I run into problems. The basic java projects work fine, but the android project complains about not being able to find the gen folder and if I try to do a clean, it complains that the project has no default.properties file. If I create the gen file myself, it still complains about the default.properties file, as well as complaining that it cant resolve java.lang.Object (!?). Not sure what's going on here. I'm guessing that something I should be checking in to source control isn't getting checked in, but I'm not really sure what. Any ideas?

Upvotes: 3

Views: 1822

Answers (1)

Paul Wicks
Paul Wicks

Reputation: 65570

The problem I was running into here was a result of having differing versions of the Android SDK/ADT as a result of doing this at just the wrong time. After I updated everything to be the same version, it all worked great.

Upvotes: 1

Related Questions