Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
🏆 Complete App & Publish  ·  Lesson 42

Signed APK/AAB & Play Store

Before you build

  1. 1Test every screen on a real phone and on Android 13+ (permissions)
  2. 2Remove test data and debug-only code; no passwords in Log calls
  3. 3App icon (adaptive), app name and a privacy policy URL ready
  4. 4Screenshots: at least 2 phone screenshots (portrait)
  5. 5Feature graphic 1024×500 and a short + full description
Release checklist

Version code and name

Kotlin DSL
// app/build.gradle.kts
defaultConfig {
    applicationId = "com.codingeasily.studentdiary"   // never change after publishing
    minSdk = 26
    targetSdk = 35          // raise when Play Console requires a newer level
    versionCode = 2         // +1 for EVERY upload (1, 2, 3 …)
    versionName = "1.1"     // shown to users
}

Shrink with R8

Kotlin DSL + ProGuard
buildTypes {
    release {
        isMinifyEnabled = true          // R8 removes unused code and shortens names
        isShrinkResources = true        // removes unused resources
        proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
    }
}

# proguard-rules.pro (Student Diary) – keep classes read by reflection (Gson)
-keep class com.codingeasily.studentdiary.network.** { *; }
-keepattributes Signature
-keepattributes *Annotation*

Always test the release build before uploading: Build → Select Build Variant → release, then run it.

Generate a signed App Bundle

  1. 1Build → Generate Signed App Bundle or APK… → Android App Bundle
  2. 2Create new… keystore: path studentdiary-upload.jks, strong passwords, alias "upload", validity 25+ years
  3. 3Choose release build variant → Create
  4. 4Find app-release.aab in app/release/ (or the path Studio shows)
  5. 5Back up the .jks file and passwords in two safe places
Android Studio wizard
Gradle – command line signing (optional)
# Optional: sign from the command line using keystore.properties (never commit it)
# keystore.properties
storeFile=../studentdiary-upload.jks
storePassword=********
keyAlias=upload
keyPassword=********

// app/build.gradle.kts
val keystoreProps = java.util.Properties().apply {
    val f = rootProject.file("keystore.properties")
    if (f.exists()) load(f.inputStream())
}
android {
    signingConfigs {
        create("release") {
            if (keystoreProps.isNotEmpty()) {
                storeFile = file(keystoreProps.getProperty("storeFile"))
                storePassword = keystoreProps.getProperty("storePassword")
                keyAlias = keystoreProps.getProperty("keyAlias")
                keyPassword = keystoreProps.getProperty("keyPassword")
            }
        }
    }
    buildTypes { release { signingConfig = signingConfigs.getByName("release") } }
}

# build the bundle
./gradlew bundleRelease
# → app/build/outputs/bundle/release/app-release.aab
Your codebundleReleaseR8 + resourcesapp-release.aabsigned with upload keyPlay App SigningGoogle re-signsOptimised APKsfor each phone
From AAB to users

Google Play Console

  1. 1play.google.com/console → create a developer account (one-time fee, ID verification)
  2. 2Create app → name "Student Diary", default language, App, Free
  3. 3Dashboard shows the setup tasks — complete each one
  4. 4Testing → Closed testing → create a release → upload the .aab
  5. 5Add testers (email list), roll out, then apply for production
One-time setup

Store listing

FieldTip
App name (30)Student Diary – Homework Planner
Short description (80)Notes, homework and exam reminders for students — works offline.
Full description (4000)Features as bullets, keywords naturally (homework app, study planner)
Graphics512×512 icon, 1024×500 feature graphic, 2–8 screenshots

App content and Data safety

  • Privacy policy URL — required (host a simple page on your website).
  • Data safety: Student Diary stores notes only on the device and makes one request to codingeasily.in for tips; declare honestly what is collected and shared.
  • Content rating questionnaire, target audience, ads declaration.
  • Permissions: explain notification usage if asked.

Testing tracks

TrackWho sees it
Internal testingUp to 100 testers you list — available in minutes
Closed testingInvited testers / Google groups (required step for new personal accounts)
Open testingAnyone can join from the Play listing
ProductionEveryone; staged rollout (e.g. 20%) possible

Releasing updates

Fix / featureversionCode + 1versionName 1.1bundleReleasesame keystorePlay Consolenew release + notes
Every update follows the same 4 steps

Common mistakes

  • Uploading with the same versionCode → "Version code 1 has already been used".
  • Release build crashes because R8 removed Gson models → keep rules.
  • Losing the keystore → painful; back it up.
  • targetSdk older than Play's requirement → upload blocked; update it.
  • Requesting permissions you do not use → policy rejection.

Summary

  • Increase versionCode, enable R8, test the release build.
  • Generate a signed .aab with an upload keystore (back it up).
  • Play Console: listing, content, data safety → testing track → production.
✅ Practice

Generate a signed AAB of Student Diary, upload it to Internal testing and install it from the Play Store link on your own phone.

Frequently Asked Questions

How much does a Google Play developer account cost?
A one-time registration fee (25 US dollars at the time of writing). Check the current amount on the Play Console sign-up page.
What if I lose my upload keystore?
With Play App Signing (default for new apps) Google keeps the app signing key, so you can request an upload key reset from Play Console support. Still, back up your .jks file and passwords safely.
Why must new personal accounts run a closed test first?
Google requires newer personal developer accounts to run a closed test with a minimum number of testers for a set period before production access. The exact numbers are shown in Play Console.
← Android Tutorial (Kotlin)
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

Next topicAndroid Interview Questions Your progress: 42 / 43 (98%) · Lesson 43 / 43 Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free