Sign an APK for Google Play

Step-by-step cryptographic signing walkthrough: generate an upload keystore, sign with apksigner, verify certificates, and upload to Google Play Console.

Overview

What app signing does

Every APK or AAB uploaded to the Google Play Store must be cryptographically signed with your developer upload key. An app signature proves the APK was built by you. Google uses this cryptographic fingerprint to ensure updates to your app come from the same trusted developer.

The debug APK generated for quick local device testing is not signed with your private key and will not be accepted for publishing — you need a release-signed build.

Step 01

Generate an upload keystore

You can create a keystore using Android Studio (Build → Generate Signed Bundle / APK → Create new) or directly via the command line using the standard Java keytool utility:

Terminal — Generate Keystore
keytool -genkeypair -keystore upload-key.jks -alias upload -keyalg RSA -keysize 2048 -validity 10000
Critical Security Notice: Back up the generated upload-key.jks in at least two secure locations. Never commit keystore files or passwords to public repositories. If you lose your key, you cannot update your app without contacting Google Play Developer Support for key recovery.
Step 02

Build the release APK from workspace

Download and extract your SiteToApp workspace ZIP. In the project root folder, execute the Gradle assemble task:

Terminal — Gradle Build
./gradlew assembleRelease

The unsigned release package will be generated at app/build/outputs/apk/release/app-release-unsigned.apk.

Step 03

Sign with apksigner

Sign the release APK using the Android SDK's official apksigner tool:

Terminal — apksigner
apksigner sign --ks upload-key.jks --ks-key-alias upload --out app-signed.apk app-release-unsigned.apk

Enter your keystore password when prompted. apksigner is located inside your Android SDK installation under build-tools/<version>/.

Step 04

Verify the signature

Confirm that your APK is correctly signed according to Android APK Signature Scheme v2/v3:

Terminal — Verify Signature
apksigner verify --print-certs app-signed.apk

If verification succeeds, the command outputs the certificate SHA-256 digest with no errors. Test install app-signed.apk on your physical device as a final sanity check.

Step 05

Upload to Google Play Console

In Play Console, navigate to Production → Create new release → Upload and add app-signed.apk. Complete the store listing and submit for review. Follow our comprehensive Play Store publishing guide for step-by-step instructions on store graphics, rating questionnaires, and rollout.

Ready to compile your project?

Generate your Android wrapper and download the complete source workspace, including the Gradle project and app assets.