1

I have created my first Android Hello World App from this tutorial http://developer.android.com/training/basics/firstapp/index.html. I did everything exactly as described in the lesson. Then I run this App on my tablet. I was wondering how much space my program takes on permanent storage. OMG! It takes 5.8 Mb! 5.8 Mb for only phrase "Hello world".

How to decrease the size? I think 0.5 Mb is enough for Hello World Application...

Dumas45
  • 501
  • 1
  • 10
  • 20
  • 1
    Check if the project is using some libraries! Consult the build.gradle file and look out for the dependencies. – Joaquin Iurchuk May 08 '15 at 11:34
  • http://stackoverflow.com/questions/14409139/why-does-my-app-size-on-device-differ-than-the-apk-or-play-store-size Heree you can find an explanation. – David_Garcia May 08 '15 at 11:34
  • for starters, try exploding the apk and see what all it contains. Then you can think about optimizing it. – asgs May 08 '15 at 11:34
  • have you considered all the framework behing your phrase? the UI, icons, etc? also, this has been asked previously, for example here http://stackoverflow.com/questions/23669134/reduce-android-application-size?rq=1 – Guillermo Merino May 08 '15 at 11:34
  • I thought you understand that Hello World App is EMPTY application. But You did not! – Dumas45 May 08 '15 at 11:57

1 Answers1

4

Please check this post.

Use Android ProGuard tool. The ProGuard tool shrinks, optimizes, and obfuscates your code by removing unused code and renaming classes, fields, and methods with semantically obscure names. The result is a smaller sized .apk file that is more difficult to reverse engineer.

Community
  • 1
  • 1
Stefan Ciprian Hotoleanu
  • 2,202
  • 1
  • 23
  • 30