16

After updating my app I am trying to upload my expo app to the playstore but getting error again and again. I changed the version in app.json version": "2.0.0" and also try this version": "1.0.1" and version": "1.0.2". I have no idea why it is showing me this error.

Answer The ios.buildNumber and android.versionCode distinguish different binaries of your app. Make sure to increment these for each build you upload to the App Store or Google Play Store.

1

2 Answers 2

32

You need to increase the android versionCode and iOS buildNumber, not the version string.

"ios": {
  "bundleIdentifier": "com.yourcompany.yourappname",
  "buildNumber": "1.0.0" //increase it for iOS
},
"android": {
  "package": "com.yourcompany.yourappname",
  "versionCode": 1 //increase it for android
}
Sign up to request clarification or add additional context in comments.

3 Comments

After 3 days finally I've got the solution, thanks so much
Thankyou for this @anthony I have been trawling the internet all day for this
i got the error: "build.production.android.versionCode" is not allowed
20

There is an automated way to do this where expo does it for you. It prevents wasting time & resources of rebuilding again when you forget to update those versions.

In the eas.json the "autoIncrement": true does the trick!

{
  "cli": {
    "appVersionSource": "remote"
  },
  "build": {
    "staging": {
      "distribution": "internal",
      "android": {
        "buildType": "apk"
      }
    },
    "production": {
      "autoIncrement": true
    }
  }
}

here is more on the docs with another option for local instead of remote: https://docs.expo.dev/build-reference/app-versions/

2 Comments

Worth noting that autoIncrement isn't available if you are using app.config.js in lieu of app.json
Thanks. Google play console didnt accept the the solution with {"android": {"versionCode": 2}}. Autoincrement with expo did the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.