React Native⏱️ 2 min read📅 2026-06-03

How to Fix: How to update the version number of a React Native app

Learn how to fix: How to update the version number of a React Native app.

Quick Answer: Try checking your system settings or restarting.

To update the version number of your React Native app, you need to modify the AndroidManifest.xml file. However, as you have noticed, this change gets reverted after building the project.

🛠️ Step-by-Step Verified Fixes

Method 1: Manual Update

  1. Step 1: Open the AndroidManifest.xml file located in your project's android folder.
  2. Step 2: Locate the <application> tag and add the `android:versionCode` attribute with the desired version number.
  3. Step 3: Save the changes and rebuild the project using the command `npx react-native run-android --version` or `npx react-native run-ios --version.

Method 2: Automated Update via Gradle

  1. Step 1: Open the build.gradle file located in your project's android folder.
  2. 1.1: Add the following code to the end of the file: `android { defaultConfig { versionCode 1 } }
  3. 1.2: Save the changes and rebuild the project using the command `npx react-native run-android --version` or `npx react-native run-ios --version.

🎯 Final Words

By following these steps, you should be able to update the version number of your React Native app and avoid the error.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions