We’re almost ready to sign your application, but first you need to create an unsigned version that you can sign with your signature certificate. To do that, in the Package Explorer window of Eclipse, right-click on your project name. You’ll get a long pop-up menu; toward the bottom, click on Android Tools. You should see another menu that includes the item you want: “Export Unsigned Application Package…”. This item takes you to a File Save dialog box, where you can pick the place to save the unsigned version of your apk file. It doesn’t matter where you put it—just pick a place you can remember.

Now that you have an unsigned version of your apk file, we can go ahead and sign it using jarsigner. Open a terminal or command window in the directory where you stored the unsigned apk file. Here’s the line we used to sign MJAndroid, using the key we generated earlier in the keystore microjobs.keystore:

$ jarsigner -verbose -keystore microjobs.keystore MJAndroid.apk mjkey

Congratulations! You now have a signed version of your application that can be loaded and run on any Android device. But before you send it in to Android Market, there’s one more intervening step….

 

Retesting Your Application

If everything went smoothly, your application is now signed and will function just as well as it did before you went through this process. But to be sure things went smoothly, it is wise to retest your application, again testing on real Android devices where possible. You really don’t want thousands of people downloading a broken application attributed to you, so just to be safe, retest on as many Android devices as you can get your hands on.

Alex Smirnov

Senior Java Developer. JAVA, PHP, Cold Fusion, SQL, Air, Flash.

More Posts