I'm storing my Android project in a Subversion repository. After recently shuffling a bunch of stuff around I started getting tons of errors like:
syntax error entries /project_name/src/.svn line 1 Android AIDL Problem
syntax error don't know what to do with "" entries /project_name/src/.svn line 28 Android AIDL Problem
etc.
It seems as if Eclipse is trying to build the files in the .svn directories now. This setup used to work fine, how can I fix this?
There is only one . svn folder, located in the base of the working copy. If you are using 1.7, then just deleting the . svn folder and its contents is an easy solution (regardless of using TortoiseSVN or command line tools).
svn, also known as the working copy's administrative directory. The files in the administrative directory help Subversion recognize which of your versioned files contain unpublished changes, and which files are out of date with respect to others' work.
To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…
svn , also known as the working copy administrative directory . The files in this administrative directory help Subversion recognize which files contain unpublished changes, and which files are out-of-date with respect to others' work.
Although you can solve this problem by installing a plugin such as Subversive, which has already been mentioned, you can also solve this problem without the plugin.
You can tell eclipse to ignore files stored in the .svn
directories inside your build path. To do that, open up the project properties by right-clicking on the project and then select the Java Build Path
option on the left. Look for the Source
tab. There you'll see all your source folders (if you haven't changed anything this would be gen
and src
for Android SDK 1.5r3). Double click the Excluded
item in the tree and add two exclusion patterns for each directory:
.svn/**
**/.svn/**
You should set the svn:ignore
keyword of your project directory to ignore the directories, which contain automatically generated files, as they can be generated at any time and do only take up space in your repository. For a current Android SDK 1.5r3 project this would be the bin
and the gen
directory. If you ignore the gen
folder this also means, that you don't need to set the exclusion pattern for this directory, as Subversion doesn't create a .svn
directory inside ignored items.
Edit: As mentioned by Henrik, it is wise to clean the project after such a change.
Install the Subclipse plugin for Eclipse. Then Eclipse will know what the .svn folders are for and quit treating them as source directories:
http://subclipse.tigris.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With