Topic 55 of 56 · Full Stack Advanced

Topic 14 : Uploading app to Playstore for android

Lesson TL;DRTopic 14: Uploading App to Play Store for Android 📖 6 min read · 🎯 advanced · 🧭 Prerequisites: reactforms, imageupload Why this matters You've built the app. You've tested it. It runs perfectly on ...
6 min read·advanced·react-native · android · google-play-store · apk

Topic 14: Uploading App to Play Store for Android

📖 6 min read · 🎯 advanced · 🧭 Prerequisites: react-forms, image-upload

Why this matters

You've built the app. You've tested it. It runs perfectly on your machine. But right now, it exists only on your laptop — nobody else can use it. That gap between "works on my device" and "available to millions on the Play Store" is exactly what this lesson closes. Publishing a React Native app to the Play Store isn't one click — it's a pipeline: generate a keystore, sign your build, configure Gradle, produce a release APK or AAB, then submit through the Google Play Console. Let's walk through every step so your app actually reaches the people it was built for.

What You'll Learn

  • Set up a Google Play Developer account and configure the Android SDK environment
  • Generate a signed release APK using a keystore and Gradle signing configuration
  • Prepare app metadata — manifest, icon, strings — for production
  • Navigate the Google Play Console to create a listing, upload the APK, and launch a production rollout

The Analogy

Think of publishing an Android app like shipping a sealed, notarized package through a regulated courier. Before the courier will accept your parcel, you must stamp it with your official seal (the keystore) so recipients know it genuinely came from you. You then fill out the shipping manifest (the Play Console listing) with the package contents, photos, and contact details. The courier inspects everything — your seal, your manifest, your labeling — before placing the parcel on the truck. Once approved, the truck rolls out and millions of devices can pick up your delivery.

Chapter 1: Prerequisites

Before a single byte hits the Play Store, two things must be in place.

1. Google Play Developer Account

Register at Google Play Console. There is a one-time $25 USD registration fee. Without a verified developer account, you cannot create or publish any application.

2. A Complete, Tested React Native Project

Your project must be fully functional, free of debug artifacts, and tested on at least one physical Android device or emulator. The Play Store review process will flag obvious crashes or missing permissions, so resolve those before starting the upload pipeline.

Chapter 2: Setting Up the Android Environment

Step 1 — Install Android Studio

Download and install Android Studio from https://developer.android.com/studio. It bundles the Android SDK, emulator, and build tools required for generating a release APK.

Step 2 — Configure the Android SDK

  1. Open Android Studio.
  2. Navigate to File → Settings → Appearance & Behavior → System Settings → Android SDK.
  3. Confirm that the required SDK platforms and build tools are installed (target the API level your app declares in build.gradle).

Step 3 — Set Environment Variables

The ANDROID_HOME variable tells React Native's build toolchain where the SDK lives.

Windows:

set ANDROID_HOME=C:\Users\<Your-Username>\AppData\Local\Android\Sdk

macOS / Linux:

export ANDROID_HOME=~/Library/Android/sdk

Add the export line to your ~/.zshrc or ~/.bashrc so it persists across terminal sessions.

Chapter 3: Generating a Signed APK

The Play Store requires every APK to be signed with a private key. That key lives in a keystore file — guard it like a password; losing it means you can never update your app under the same package name.

Step 1 — Create a Keystore

keytool -genkey -v -keystore my-release-key.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias my-key-alias

keytool prompts you for your name, organization, city, country, and a keystore password. When it finishes, a file named my-release-key.keystore is created. Store it outside version control and back it up securely.

Step 2 — Configure Gradle for Signing

Open android/app/build.gradle and add the signingConfigs block:

android {
    ...
    defaultConfig { ... }
    signingConfigs {
        release {
            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
                storeFile file(MYAPP_RELEASE_STORE_FILE)
                storePassword MYAPP_RELEASE_STORE_PASSWORD
                keyAlias MYAPP_RELEASE_KEY_ALIAS
                keyPassword MYAPP_RELEASE_KEY_PASSWORD
            }
        }
    }
    buildTypes {
        release {
            ...
            signingConfig signingConfigs.release
        }
    }
}

Referencing variables via project.hasProperty keeps credentials out of the source file itself.

Step 3 — Set Up Gradle Variables

Create or edit android/gradle.properties with your actual signing values:

MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_STORE_PASSWORD=your-store-password
MYAPP_RELEASE_KEY_PASSWORD=your-key-password

Add gradle.properties to .gitignore — it contains plain-text secrets.

Step 4 — Build the Signed APK

cd android
./gradlew assembleRelease

The signed APK is output to:

android/app/build/outputs/apk/release/app-release.apk
flowchart LR
    A[keytool → keystore] --> B[gradle.properties]
    B --> C[build.gradle signingConfig]
    C --> D[./gradlew assembleRelease]
    D --> E[app-release.apk]
    E --> F[Google Play Console]

Chapter 4: Preparing for Release

Step 1 — Update App Information

android/app/src/main/AndroidManifest.xml — confirm the package name and label:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.yourappname">
    <application
        android:label="Your App Name"
        android:icon="@mipmap/ic_launcher"
        ...>
        ...
    </application>
</manifest>

android/app/src/main/res/values/strings.xml — set the human-readable app name:

<resources>
    <string name="app_name">Your App Name</string>
</resources>

Step 2 — Create an App Icon

Generate launcher icons at every required density and place them in the corresponding mipmap directories:

DirectoryDensitySize
mipmap-mdpi160 dpi48×48 px
mipmap-hdpi240 dpi72×72 px
mipmap-xhdpi320 dpi96×96 px
mipmap-xxhdpi480 dpi144×144 px
mipmap-xxxhdpi640 dpi192×192 px

Tools like Android Asset Studio or the react-native-make CLI can generate all sizes from a single source image.

Chapter 5: Uploading to the Google Play Store

Step 1 — Log In to Google Play Console

Navigate to https://play.google.com/console and sign in with the account used during registration.

Step 2 — Create a New Application

  1. Click "Create app".
  2. Enter the app name, default language, and app type (e.g., App and Free).
  3. Click "Create".

Step 3 — Prepare the Store Listing

Fill in all required fields before the APK upload is accepted:

  1. App details — title, full description (up to 4,000 characters), and short description (up to 80 characters).
  2. Graphics — upload screenshots for each target device form factor, a high-resolution icon (512×512 px PNG), and a feature graphic (1024×500 px).
  3. Categorization — select the appropriate app category and tags so users can discover your app.
  4. Contact details — provide a developer email address, website URL, and optional phone number.

Step 4 — Upload the APK

  1. Navigate to the "Release" section in the left sidebar.
  2. Click "Create new release".
  3. Upload app-release.apk (or an AAB if you've switched to the App Bundle format).
  4. Fill in the release notes (what's new in this version) and click "Save".

Step 5 — Review and Publish

  1. Review all store listing information, content ratings, and pricing settings.
  2. Click "Review release" — the console will surface any policy violations or missing fields.
  3. Once all checks pass, click "Start rollout to production".
  4. Click "Confirm" to begin the rollout. Google's review team may take a few hours to a few days to approve a new app.

🧪 Try It Yourself

Task: Generate a signed release APK for a basic React Native "Hello World" app and verify the signature.

  1. Scaffold a new project: npx react-native init HelloWorld
  2. Follow Chapters 2–3 to create a keystore and configure Gradle.
  3. Run ./gradlew assembleRelease from the android/ directory.
  4. Verify the signature on the output APK:
keytool -printcert -jarfile android/app/build/outputs/apk/release/app-release.apk

Success criterion: The command prints your certificate's CN (the name you entered during keystore creation) and shows a valid validity period of ~10,000 days. No "unsigned" warnings should appear.

🔍 Checkpoint Quiz

Q1. Why must you never commit android/gradle.properties to a public git repository?

Q2. Given the following build.gradle snippet, what happens if the MYAPP_RELEASE_STORE_FILE property is missing from gradle.properties?

signingConfigs {
    release {
        if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
            storeFile file(MYAPP_RELEASE_STORE_FILE)
            storePassword MYAPP_RELEASE_STORE_PASSWORD
            keyAlias MYAPP_RELEASE_KEY_ALIAS
            keyPassword MYAPP_RELEASE_KEY_PASSWORD
        }
    }
}

A) The build fails with a missing-property exception
B) The release signing config is created but has no storeFile, so the APK is unsigned
C) Gradle skips the release build type entirely
D) The APK is signed with a default debug keystore

Q3. What is the correct output path for a signed release APK after running ./gradlew assembleRelease?

A) android/app/release/app-signed.apk
B) android/build/outputs/apk/app-release.apk
C) android/app/build/outputs/apk/release/app-release.apk
D) android/outputs/release/app-release.apk

Q4. You've built and signed your APK and are ready to upload, but the Play Console "Review release" step flags an error about a missing content rating. How do you resolve it?

A1. gradle.properties contains plain-text keystore passwords. Publishing it exposes your signing credentials, allowing anyone to sign APKs impersonating your app and potentially push malicious updates to your users.

A2. B — The if (project.hasProperty(...)) guard means the signing block is silently skipped. The release signing config exists but has no storeFile, so the resulting APK will be unsigned and rejected by the Play Store.

A3. Candroid/app/build/outputs/apk/release/app-release.apk is the standard Gradle output path for a signed release APK.

A4. Complete the content rating questionnaire in the Play Console under Policy → App content → Content ratings. You must answer the questionnaire before Google will allow a production rollout; once submitted, the rating is calculated automatically and the error clears.

🪞 Recap

  • A Google Play Developer account ($25 one-time fee) and a fully tested React Native project are the two non-negotiable prerequisites.
  • A keystore file generated with keytool is your permanent app identity — back it up and never expose it in version control.
  • Gradle signing configuration in build.gradle + secrets in gradle.properties produce a signed app-release.apk via ./gradlew assembleRelease.
  • The Play Console requires a complete store listing (description, screenshots, icon, content rating) before any release can go to production.
  • Once all checks pass, "Start rollout to production" initiates Google's review; approval can take hours to a few days for a new app.

📚 Further Reading

Like this topic? It’s one of 56 in Full Stack Advanced.

Block your seat for ₹2,500 and join the next cohort.