Home » Android » java – Eclipse is trying to build the files in my .svn directories… how can I tell it to stop?

java – Eclipse is trying to build the files in my .svn directories… how can I tell it to stop?

Posted by: admin June 15, 2020 Leave a comment


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


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?

How to&Answers:

It is worked for me:

  • Delete your project from eclipse (not from disk).
  • “File”->”New..”->”Project”->”Android Project”
  • in “New Adroid Project”-Dialog selected “create project from existing source” (find your project on HDD)->”Finish”

my .classpath-file

<?xml version="1.0" encoding="UTF-8"?><classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="output" path="bin"/></classpath>


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:


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:



You have your src folder in your build path, as such, it will try to build anything in your .svn directory. My suggestion would be to remove the .svn folder from the src folder.

Alternatively, you can choose to exclude folders from your build path. If you have Eclipse 3.4+, go to your build path and under source, you should see something called Excluded under your src folder as listed in the Source Folders on Build Path.

Go to edit and you can include a pattern to stop the .svn folder from being included in the build path.

Edit: If you want your folders to be hidden in the package explorer, hit the down array found near the top of that view (it’s a white arrow) and hit filter. Then check the box that says Name filter Patterns and type in .svn, that should hide that folder.


if you have the patience or not have too many of them folders you can right click it in the navigator view and make sure to check the derived property.

This should cause eclipse to ignore these folders.

…hmmm… wait a minute… you said you shuffled a lot of stuff around…. did you do this through windows explorer or inside eclipse ?

There are commands in SVN to move folders that are under source control, if you do not use them you run the chance that SVN will not recognized these folders from their original and will loos history attached to the file itself. worst somethins I got some weird side effects where the only solution was to

  1. delete all the .svn folders
  2. copy all the source elsewhere
  3. do a checkout from scratch
  4. overwrite the files from repository with backup in 2
  5. checkin

Then I did the rearrangement from eclipse or directly in the SVN through the SVN repository explorer and started working again with a new checkout.

Usually eclipse deals fairly well with these .svn folders but in some rare occasion it gets all out of whack and I had to start from scratch, sometimes reinstalling eclipse from pulse directly (try pulse it’s definitively worth it, reinstalling your environment from scratch on a new system is but a few clicks).

Anyhow.. hope this helps… good luck


I would recommend using the Subversive plugin to provide proper integration for using svn repositories with Eclipse.