When you finish your Android app coding and testing, if you want to publish it to google play store, you should create a publishable apk file. This article will show you how to create publishable apk file step by step.
1. Generate Publishable APK File Steps.
- Open Android Studio, click ” Build —> Generate Signed APK “.
- There will popup a dialog. There are two sections in the dialog. Key store and key. Key store is a file which has jks ( java key store ) suffix. This file will be used to save multiple different app keys. If you have multiple android apps, you can provide each app with one key. But it is best for you to use single key to sign multiple apps, because those apps signed with same key can trust each other in communication. And it is easy for maintain.
- If you do not has existing key store file, click ” Create new…” button in above dialog. There will popup another dialog. You should select a key store file path with key store file name and input a strengthen password for it. The key store file path must be an existing directory otherwise android studio will not create it for you.
- In the key section, input an alias name for the new key. The alias can not include white space and punctuation. Make sure the alias is unique in both charactor and charactor case if you have multiple key with multiple alias.
- Also input a strong password for the new generated key.
- The default validity years is 25, that is enough for your apk file. Because google play store’s rule require your key must be valid before October 22, 2033.
- Input your information in certificate area.
- Click OK button. It will return to the ” Generate Signed APK ” dialog. And all the key store and key information has been inputed in that dialog also.
- Click Next button, there will popup another dialog. You can choose APK destination folder and build type. The build type should be release in this example.
- Select at least one Signature Version checkbox at bottom in above dialog, click Finish button. Then you can get the publishable apk release file. You can click here see detail explanation for Signature Version.
2. Build Android Debug Apk File Steps.
- Open Android Studio, and click ” Build —> Build APK ” in top tool bar.
- When the build process complete, there will popup a dialog at right bottom of Android Studio. Click the link to open the folder where the apk created.
- You can see a file named as app-debug.apk in that folder (