Removing unused libraries from Android builds

Hi all,

Even if you’re not using them, Corona will include Facebook, Flurry, OF, and other libraries in your apk file. If you’re interested, I’ve written a blog post describing how you can remove them to cut down on the size of your apks:

http://www.ludicroussoftware.com/blog/2012/05/08/remove-unused-libraries-from-corona-apps/

Thanks,
Darren [import]uid: 1294 topic_id: 26074 reply_id: 326074[/import]

Nice!

A point worth noting: Even if you do not want to remove unused libraries, it would be better if you decompile and build the app using apktool. The size of the apk reduces significantly by about 40%. [import]uid: 64174 topic_id: 26074 reply_id: 105576[/import]

Great tips - same process I use. I tried decompiling and then rebuilding with apktool as Satheesh mentioned, but could never get it to recompile and then run correctly. If you can manage that part, I’d be very interested! [import]uid: 49447 topic_id: 26074 reply_id: 105600[/import]

@producerism

It should work perfectly… I have never encountered any problems with apktool. I have used this for some apps which are in play store.

What problem do you encounter?
[import]uid: 64174 topic_id: 26074 reply_id: 105603[/import]

Producerism:

If you scroll down to the end of the blog post, there’s a three-step process for recreating a valid, signed apk file that you can install to your device(s) and submit to Google Play, etc. Basically, use apktool to build the apk, sign it with jarsigner, and then zipalign it. That should work.

Satheesh:

That’s pretty cool, I didn’t realize that! It actually looks like the space savings from deleting the libraries is pretty minor (about 400K), and the bulk of the space is just from using the more efficient packaging process. I’ll have to update the blog post!

Thanks,
Darren [import]uid: 1294 topic_id: 26074 reply_id: 105616[/import]