Do I need /app/src/debug folder in my git after android run?

Issue

After I changed icon of my app and run it, /app/src/debug folder was created.

Do I need it in git?
If not, why gitignore doesn’t have it?

Solution

There is no need for the build folder in git. You can delete it.

Additionally, don’t forget to update your gitignore file.

  • Make changes in .gitignore file.
  • Run git rm -r –cached . command.
  • Run git add . command
  • git commit -m "Commit message" or just git
    commit or continue working.

Sample gitignore – android file.

# Gradle files
.gradle/
build/

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

# Log/OS Files
*.log

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
google-services.json

# Android Profiling
*.hprof

The debug folder will need to be used if there is content in the relevant variant.

Answered By – Arda Kazanc─▒

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published