2

I've build an open source app with Android Studio and I've share alle the files on GitHub. I thinks that there are a lot of unnecessary files such as those generated by the debugging (that for each commit are uploaded) so, which are the necessary files that i've to share to allow someone to download and open my project?

This is the Project on github

Leonardo Rignanese
  • 865
  • 11
  • 22
  • Possible duplicate of [What should be in my .gitignore for an Android Studio project?](http://stackoverflow.com/questions/16736856/what-should-be-in-my-gitignore-for-an-android-studio-project) – 1615903 Nov 23 '15 at 10:15

1 Answers1

1

This SO post addresses the same issue that you are having. You need to add these lines in .gitignore. You can add to this list. Your project in github does not contain .gitignore. You can start with adding it.

The below list is indicative and is provided by Android Studio by default. Based on your need you might need to add to this list.

*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures

As a side note, as you already have these files committed to git, you will need to remove them first. Then if you add .gitignore they will not be indexed again.

This SO url might be of help for you as well.

Community
  • 1
  • 1
Swagata Acharyya
  • 647
  • 4
  • 10
  • Seems simpler to ignore everything in "build" rather than all those file types. – nasch Nov 22 '15 at 23:20
  • Android Studio doesn't create `bin` or `gen` folders. Also, it will not create any `.class` or `.dex` files to the project root, from which this .gitignore is trying to ignore them. – 1615903 Nov 23 '15 at 10:13
  • I have cleared the confusion. The gitignore I used was from the example that I linked in the answer. – Swagata Acharyya Nov 23 '15 at 13:28
  • This does NOT answer the question. This is just saying to add a file, not which files HAVE to be shared!! – Prastt May 23 '18 at 08:40