3

My APK is coming out to around 19 MB. I have no pictures or sound files in my project and only one class. Looking through the directory of my project folder (which is about 50 MB), most of the size seems to be coming from the .git folder in my src folder, and the .git folder in my bin folder, but I am under the impression that the .git folder is not included in the final APK. Does anyone know what could be causing this large size? I have tried cleaning the project as well with no luck. I am not referencing any other libraries, and my only private library is Google AdMobs. I am also using ProGuard.

thiagolr
  • 6,909
  • 6
  • 44
  • 64
John Roberts
  • 5,885
  • 21
  • 70
  • 124

2 Answers2

1

The best approach is to init your git repository on your project's root folder and not on the src folder. The project's root folder is the one where the AndroidManifest.xml is located!

The .git folder is where all the git version control files are stored and it gets bigger as the project is developed.

thiagolr
  • 6,909
  • 6
  • 44
  • 64
  • So can I literally just cut and paste it? – John Roberts May 20 '13 at 18:10
  • 1
    It is not as easy as cut and paste. If you wish to maintain the version control you should do what is explained here: http://stackoverflow.com/questions/614229/can-i-move-the-git-directory-for-a-repo-to-its-parent-directory – thiagolr May 20 '13 at 18:23
  • Or you could start a new version control on the root folder and delete the existing one on the src folder (and you will lose the current version control). – thiagolr May 20 '13 at 18:24
  • What if I'm not using git at all for my project? I've only used Eclipse up to this point. Can I just get rid of it altogether? – John Roberts May 20 '13 at 18:26
  • If you are not using git, you can delete the .git folder! – thiagolr May 20 '13 at 18:35
  • Haha, nice man. The size just went from 19 megabytes to 190 KB. – John Roberts May 20 '13 at 21:22
0

Have a look at the Android Size Analyzer. Details on this page: reduce-apk-size

ciaranodc
  • 398
  • 4
  • 16