🏆 पूरी App और Publish · Lesson 42
Signed APK/AAB और Play Store
Build से पहले
- 1हर screen असली phone और Android 13+ (permissions) पर test करें
- 2Test data और debug-only code हटाएँ; Log calls में passwords नहीं
- 3App icon (adaptive), app name और privacy policy URL तैयार
- 4Screenshots: कम से कम 2 phone screenshots (portrait)
- 5Feature graphic 1024×500 और short + full description
Version code और 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
}R8 से shrink
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*Upload से पहले हमेशा release build test करें: Build → Select Build Variant → release, फिर run करें।
Signed App Bundle बनाइए
- 1Build → Generate Signed App Bundle or APK… → Android App Bundle
- 2Create new… keystore: path studentdiary-upload.jks, strong passwords, alias "upload", validity 25+ साल
- 3Release build variant चुनें → Create
- 4app/release/ में app-release.aab ढूँढें (या Studio का दिखाया path)
- 5.jks file और passwords का दो safe जगह backup
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.aabGoogle Play Console
- 1play.google.com/console → developer account बनाएँ (one-time fee, ID verification)
- 2Create app → नाम "Student Diary", default language, App, Free
- 3Dashboard setup tasks दिखाता है — हर एक पूरा करें
- 4Testing → Closed testing → release बनाएँ → .aab upload
- 5Testers (email list) जोड़ें, roll out करें, फिर production के लिए apply
Store listing
| Field | Tip |
|---|---|
| App name (30) | Student Diary – Homework Planner |
| Short description (80) | Notes, homework and exam reminders for students — works offline. |
| Full description (4000) | Features bullets में, keywords natural तरीके से (homework app, study planner) |
| Graphics | 512×512 icon, 1024×500 feature graphic, 2–8 screenshots |
App content और Data safety
- Privacy policy URL — ज़रूरी (अपनी website पर simple page host करें)।
- Data safety: Student Diary notes सिर्फ़ device पर रखती है और tips के लिए codingeasily.in को एक request करती है; जो collect और share होता है ईमानदारी से declare करें।
- Content rating questionnaire, target audience, ads declaration।
- Permissions: पूछा जाए तो notification usage समझाएँ।
Testing tracks
| Track | कौन देखता है |
|---|---|
| Internal testing | आपके list किए 100 तक testers — कुछ मिनट में available |
| Closed testing | Invited testers / Google groups (नए personal accounts के लिए ज़रूरी step) |
| Open testing | Play listing से कोई भी join कर सकता है |
| Production | सब; staged rollout (जैसे 20%) possible |
Updates release करना
आम गलतियाँ
- वही versionCode upload करना → "Version code 1 has already been used"।
- R8 ने Gson models हटा दिए इसलिए release build crash → keep rules।
- Keystore खोना → बहुत परेशानी; backup रखें।
- Play की requirement से पुराना targetSdk → upload blocked; update करें।
- जो permissions use नहीं करते उन्हें माँगना → policy rejection।
सारांश
- versionCode बढ़ाएँ, R8 enable करें, release build test करें।
- Upload keystore से signed .aab बनाएँ (backup रखें)।
- Play Console: listing, content, data safety → testing track → production।
✅ Practice
Student Diary का signed AAB बनाकर Internal testing में upload कीजिए और Play Store link से अपने phone पर install कीजिए।
अक्सर पूछे जाने वाले प्रश्न (FAQ)
Google Play developer account कितने का है?
एक बार की registration fee (लिखते समय 25 US dollars)। Current amount Play Console sign-up page पर देखें।
Upload keystore खो जाए तो?
Play App Signing (नई apps के लिए default) में app signing key Google रखता है, इसलिए Play Console support से upload key reset माँग सकते हैं। फिर भी .jks file और passwords का safe backup रखें।
नए personal accounts को पहले closed test क्यों चलाना पड़ता है?
Google नए personal developer accounts से production access से पहले तय समय तक minimum testers के साथ closed test चलवाता है। Exact numbers Play Console में दिखते हैं।
