Recently, my mobile development team released an application to the Google Play store. I was in charge of zipaligning the app, which I had never done before. It isn’t that difficult of a process but, like most things the first time, it can be tricky. In this blog I will walk you through the process in seven easy steps.
If you’re not familiar, zipaligning an application essentially condenses and optimizes the application, allowing for a more efficient interaction between the application and Androids operating system. It allows the entire application to run faster and results in less RAM usage.
It’s important to note that I was working in Eclipse using the ADT (Android Developer Tool) Plugin. A link to the ADT Plugin can be found at the bottom of this blog. If you do not have eclipse there is also an optional Android SDK (Software Development Kit) with the ADT Bundle. While completing this process I experimented with Android Studio. However, Android Studio is still an unfinished product and had some bug issues, so I decided to stick with the ADT.
Step 1: Open Application
The first step is simple. You need to open your project in Eclipse with ADT and Select: File -> Export.
Step 2: Export Application
From the ‘Export’ menu select: Android Folder -> Export Android Application. Then hit the Next button.
Step 3: Ensure Correct Application is Selected
From the ‘Export Android Application’ menu, the name of your project should be auto populated in the Project field. (At this point you can ‘browse’ and select a different project if you accidently exported the wrong project.) Hit the Next button.
Step 4: Enter or Create a New Keystore
The ‘Export Android Application’ should now prompt you to ‘Enter path to keystore*’.
If you have released an app and have a keystore hit ‘Use existing keystore’ option and fill in your credentials. Otherwise, select ‘Create new keystore’ and enter a location, (somewhere safe), and a password for that keystore. Note, make sure that your keystore is in a secure location and the password is secure as well. If you cannot find your keystore or forget your password, you will not be able to update the application once released. Furthermore, if someone obtains your keystore and password, they can access your applications on the Google Play Store.
Step 5: Enter Key Information
You should then be prompted to create a Key and enter the Alias*, Password and Validity Year. Ensure your validity is set to 25, the minimum for release to the app store. When the fields are completed, hit next.
Step 6: Select Destination for APK
Next you will be prompted to select a destination for your application’s APK (Android Package file). Hit browse and select the location to place APK. Hit finish.
Step 7: Upload to Google Play Store
Once the application has finished the zipalign process, navigate to the destination you selected for your APK. Find your APK and follow the steps to submit it to the Google Play store, link below.
Congratulations, you have just zipaligned your first Google application! Now you should be able to do it easily with your next app release.
I know there are countless websites that provide instructions on how to zipalign an application. However, I found that many of them can be confusing. I hope this set of instructions useful and easy to follow. Nonetheless, if you are confused by a step or want more information, you can find a link to Google’s instructions to zipalign your application below.
*Keystore: A keystore, as far as zipaligning an android app is concerned, holds keys to your application. A key is essentially a certificate that attaches your credentials to your app. It can and should be used with multiple applications. It allows you, the developer, to keep track of what applications are yours and allows those using your application to know also.
*Key alias: This is the ‘public’ key that will be imbedded in your application. Along with the other information you desire to be attached to your app; first-last name, organizational unit, organization, city, state, and country code.
Our mobility consulting professionals have extensive experience developing enterprise and consumer mobile apps on the Apple iOS, Android, and Windows Phone platforms. Contact us for more information on how we can work with you to ensure that your mobile apps follow the appropriate best practices.