Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Zipalign - Is it built into Titanium?

I've read that you should zipalign your apk-file before releasing it. Do we have to do this ourselves or will Titanium take care of it for you?

Since I didn't know I did it myself, when I saw that a lot of other files are included in my apk, images that I don't need. Example:

3609754 org/appcelerator/titanium/res/drawable/btn_picker_pressed.9.png (OK - compressed)
3614329 org/appcelerator/titanium/res/drawable/btn_picker_selected.9.png (OK - compressed)
3618923 org/appcelerator/titanium/res/drawable/default_icon.png (OK - compressed)
3622702 org/appcelerator/titanium/res/drawable/photoDefault.png (OK - compressed)
3626816 ti/modules/titanium/facebook/LICENSE (OK - compressed)
3627659 ti/modules/titanium/facebook/resources/close.png (OK - compressed)
3627914 ti/modules/titanium/facebook/resources/fbicon.png (OK - compressed)

Are these really necessary? For most apps they only make the file size bigger, which is a shame.

— asked November 28th 2010 by Gerhard Jonsson
  • android
  • zipalign
0 Comments

2 Answers

  • You don't say which SDK you're using, but the upcoming 1.5.0 release has zipalign and it also generates a smaller apk.

    — answered November 28th 2010 by Don Thorp
    permalink
    1 Comment
    • To add to Don's point, the images you refer to are used by Titanium for stock views, such as tableviews etc (hasChild, hasDetail icons). If you use those views, then they are required although, if not, then they are superfluous. Anyway, these are very tiny files, so personally I don't consider them a concern.

      — commented November 29th 2010 by Paul Dowsett
  • I'm using SDK 1.4.2.

    — answered November 28th 2010 by Gerhard Jonsson
    permalink
    1 Comment
    • I believe it's in 1.4.2. But for Android 1.4.2 is the exact same as the shipping 1.4.0. So there have been lots of fixes since then.

      — commented November 29th 2010 by Don Thorp
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.