37

In Eclipse, I had the custom of adding bin and gen directories to SVN ignore. But now, using Android Studio (based on IntelliJ IDEA), which files should I ignore?

bluish
  • 26,356
  • 27
  • 122
  • 180
elirigobeli
  • 1,391
  • 2
  • 15
  • 22
  • See http://stackoverflow.com/questions/16736856/what-should-be-in-my-gitignore-for-an-android-studio-project – mjn Aug 11 '14 at 09:03
  • Does this answer your question? [What should be in my .gitignore for an Android Studio project?](https://stackoverflow.com/questions/16736856/what-should-be-in-my-gitignore-for-an-android-studio-project) – bluish Nov 29 '19 at 14:30

3 Answers3

34

I added the following items in my .gitignore, it should be the same for SVN:

  • gradle
  • .idea
  • *.iml
  • build
  • .DS_Store (for mac only)
moictab
  • 959
  • 6
  • 27
JulienC
  • 573
  • 6
  • 10
18

See this IntelliJ IDEA KB article: "How to manage projects under Version Control Systems".

Add to Subversion:

  • all files under /.idea directory in the project root but ignore workspace.xml and tasks.xml,
  • all .iml module files.
Lonzak
  • 9,334
  • 5
  • 57
  • 88
bahrep
  • 29,961
  • 12
  • 103
  • 150
  • This seems to be the correct answer. The files under .idea should be included and also the .iml files. – zreptil Sep 23 '15 at 07:44
  • 3
    As replied by "Serge Baranov" on same thread, it would depend on the project you are using. If the project is Maven or Gradle based and these library files are generated automatically on import, you can exclude them from the version control. When the libraries are configured manually by the user, they should be shared. – Sachchidanand Nov 17 '15 at 13:10
11

I've used the following SVN ignore list sucessfully:

.gradle
local.properties
.idea/workspace.xml
.idea/libraries
.DS_Store
build

The ignore should be applied recursively.

Reference: Same question, for git

Community
  • 1
  • 1
CodyF
  • 4,977
  • 3
  • 26
  • 38