1

I am trying to upload an .apk on GooglePlayConsole. This .apk is generated with Expo (and coded in React-Native).

The first time, I generated it by default, and it got the codeVersion: 1 (which is basically a batch of permissions). However, my .apk has been unauthorized due to "No need about this permissions".

So I rebuilt the .apk with another codeVersion (without any permissions), which should be approuved. However, when I am trying to upload the .apk on GooglePlayConsole (where my previous has been unapprouved), I got an error message :

You should use another code version for your APK or Andoid App Bundle. The code 1 is already use by another APK or Android App Bundle.

But I do not know where (or if) I can change the codeVersion of an application on GooglePlayConsole.

I thought about deleting the app, but this is not possible once it has been rejected.

There is a screenshot : https://puu.sh/CFAQS/ff43b0ccb8.png

Thanks.

GuillaumeRZ
  • 2,656
  • 4
  • 19
  • 35
  • I do not think it is. I think Google is attending for an apk with code 1, but this is not anymore since I configure Expo to build an app without any permissions right. Furthermore, I do not have any manifest.xml etc. I just generate my apk from my JS files with Expo. – GuillaumeRZ Feb 01 '19 at 12:04
  • 1
    According to [this](https://docs.expo.io/versions/latest/workflow/configuration/) there's a JSON file where you can specify the `versionCode` when using Expo. – Michael Feb 01 '19 at 12:09
  • Yeah, there is, but like I said : `1` is when you need using default permissions (my first attempt), but my app as been rejected (because no need of any permissions). So I rebuild an `.apk` with the `versionCode` relative : no permission. But when I upload the APK, Google pop me an error, attending for a `versionCode` of `1`. – GuillaumeRZ Feb 01 '19 at 12:12
  • 1
    That just doesn't add up. Either you're not building what you think you are building, or you're uploading the wrong APK, or your build tools are broken. The `versionCode` is not something set by Google. It's part of the APK (the manifest, specifically). – Michael Feb 01 '19 at 12:19

1 Answers1

1

Change the versionCode in gradle app:

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "applicationId"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1 ----- Here you should change your versionCode
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}
Antoine El Murr
  • 317
  • 1
  • 13