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
- Open Android Studio.
- Navigate to File → Settings → Appearance & Behavior → System Settings → Android SDK.
- 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:
| Directory | Density | Size |
|---|---|---|
mipmap-mdpi | 160 dpi | 48×48 px |
mipmap-hdpi | 240 dpi | 72×72 px |
mipmap-xhdpi | 320 dpi | 96×96 px |
mipmap-xxhdpi | 480 dpi | 144×144 px |
mipmap-xxxhdpi | 640 dpi | 192×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
- Click "Create app".
- Enter the app name, default language, and app type (e.g., App and Free).
- Click "Create".
Step 3 — Prepare the Store Listing
Fill in all required fields before the APK upload is accepted:
- App details — title, full description (up to 4,000 characters), and short description (up to 80 characters).
- Graphics — upload screenshots for each target device form factor, a high-resolution icon (512×512 px PNG), and a feature graphic (1024×500 px).
- Categorization — select the appropriate app category and tags so users can discover your app.
- Contact details — provide a developer email address, website URL, and optional phone number.
Step 4 — Upload the APK
- Navigate to the "Release" section in the left sidebar.
- Click "Create new release".
- Upload
app-release.apk(or an AAB if you've switched to the App Bundle format). - Fill in the release notes (what's new in this version) and click "Save".
Step 5 — Review and Publish
- Review all store listing information, content ratings, and pricing settings.
- Click "Review release" — the console will surface any policy violations or missing fields.
- Once all checks pass, click "Start rollout to production".
- 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.
- Scaffold a new project:
npx react-native init HelloWorld - Follow Chapters 2–3 to create a keystore and configure Gradle.
- Run
./gradlew assembleReleasefrom theandroid/directory. - 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. C — android/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
keytoolis your permanent app identity — back it up and never expose it in version control. - Gradle signing configuration in
build.gradle+ secrets ingradle.propertiesproduce a signedapp-release.apkvia./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
- Official Android APK signing docs — the source of truth on keystore management and signing workflows
- React Native Publishing to Google Play — React Native's official step-by-step guide for release builds
- Google Play Console Help — PLACEHOLDER — policy, review timelines, and store listing requirements
- ⬅️ Previous: Image Upload
- ➡️ Next: Deployment