Mike Szczys · Apr 25, 2013 at 06:30 pm

Building with Apache Ant

It’s pretty easy to build APKs using Eclipse, but The Apache Ant project brings a few things to the table which you might be interested in—especially if you’re creating closed source apps. The package is designed to handle Java application builds (although it can be used with other languages as well). One of its best traits is that it will help shrink the size of your code by parsing for unused variables, methods, and classes to then strip them out as cruft. But I did mention closed source, and that’s because Ant has the ability to help obfuscate your bytecode to help prevent reverse-engineering through the use of ProGuard.

One of the reasons more people don’t use it is that it can be a little daunting at first glance. But to help you get a foothold, check out this setup guide for Ant builds. It’s not exactly tailor made, but if you search additional resources like the Ant Project Page itself, you should be able to get things working. The final project will spit out two builds at the touch of a button. One will be a private build for your own use during debugging. This code hasn’t been obfuscated, unlike the other package, which is a public copy that can be sent off to the Play Store or any other distribution channel of your choosing.


_________
Want something on the XDA Portal? Send us a tip!

Mike Szczys

szczys is an editor on XDA-Developers, the largest community for Android users. Mike Szczys is a professional musician but spends all his free time working with hobby electronics. As Contributing Editor for Hackaday.com he became interested in Android as some of the early hardware hacks started popping up on the Internet. What followed was a gradually rising addiction to all things Android. View szczys's posts and articles here.
Mario Tomás Serrafero · Apr 19, 2015 at 10:00 am · no comments

Sunday Debate: Better to Buy Older or Newer Hardware?

Join us in a fun Sunday Debate on New vs. Old. Come with your opinions and feel free to read some of our thoughts, then pick your side or play devil’s advocate to get your voice heard and engage in friendly discussion. You can read our food-for-thought or jump straight into the fray below! Smartphone purchases make for some of the sweetest times of the year for many of us. After all, we are hobbyists of Android and a new...

XDA NEWS
Mario Tomás Serrafero · Apr 18, 2015 at 10:00 am · 4 comments

Open War for Open Android: Antitrust for Cyanogen?

Android and openness is something we talk about all the time, but the recent developments in the industry point towards inherent flaws with this very premise. Be it from bloggers, political institutions or corporations, Android is seemingly not open enough. The “War on Openness” is ironically becoming an open war, where many players are increasing their stakes and scope to try and land a bigger hold - or at the very least, restrict Google’s - on what is the world’s...

XDA NEWS
Emil Kako · Apr 17, 2015 at 01:22 pm · 3 comments

What Do You Do with All of Your Old Photos?

Smartphone cameras have advanced so tremendously over the past few years that they have almost completely replaced point and shoot digital cameras for the most of us. Furthermore, since our smartphones are always with us, the majority of us end up taking tons of photos throughout the lifespan of our devices. But what happens to all the old photos you take? Do you store them on an external hard-drive or keep them backed up to an online cloud service like Flickr? Let us know what your favorite way of storing old photos is and why.

DISCUSS
Share This