Tuesday, December 18, 2012

Android building unsigned APK

Just a small Android development tip:

The Android export wizard that comes with Eclipse allows you to build the "release" APK of your application but expects you to have the signing keys at the time of the build, otherwise it doesn't allow to proceed. Sometimes you just need to send the unsigned APK to your client and allow them to sign it later.

The easiest way to accomplish that at the moment is to do the build with Ant (build.xml).
In order to generate the build.xml file you can run the following command in your application directory:
android update project --path .

This will create the build.xml file for you project. Then run:
ant release

and this will create the -release-unsigned.apk in your bin directory.
Sometimes (most of the time) the android tool doesn't pick the right name for the project and you might   end up with something like MainActivity-release-unsigned.apk, in that case just edit the project name property in the build.xml.

Note that if your app depends on the other library projects, then these also need to have the build.xml generated for them.

1 comment:

AAREN said...

Very useful information.Thanks for share it...!

android mobile application