Should I add .idea/caches/build_file_checksums.ser to .gitignore?

All files in your .idea folders are related to your IDE (Android Studio in this case). And as you said this files is created at the opening of the project. So you should add this file to your .gitignore because these files can contains some content that is not necessary like your absolute path.

You should add it to .gitignore. Don't include it in your git add.

In the left-side Project window,

(a) change the Android view to the Android project view, with the pull-down menu.
(b) You can see build_file_checksums.ser in folder .idea/caches.
(c) Open .gitignore of the project root directory. (Don't confuse it with .gitignore of the app module.)

In the right-side .gitignore content,

(d) add /.idea/caches/build_file_checksums.ser.

enter image description here

JetBrain's guide told that you should share

  • All the files under .idea directory in the project root except the workspace.xml and tasks.xml files which store user specific settings

and it also said

You may consider not to share the following:

  • .iml files for the Gradle or Maven based projects, since these files will be generated on import
  • gradle.xml file, see this discussion
  • user dictionaries folder (to avoid conflicts if other developer has the same name)
  • XML files under .idea/libraries in case they are generated from Gradle or Maven project

Therefore, the default .gitignore for new projects in Android Studio is:


But, the build_file_checksums.ser file is a Java serialized object, which contains hash and timestamp of:

  • "settings.gradle"
  • "build.gradle"
  • ""
  • "/Users/(User Name)/.gradle/"
  • ""
  • "app/build.gradle"

So, it seems like the issue was priority P2 and severity S2, and has been already accepted and fixed. I look forward to future release, in which the default .gitignore includes