3

I have an instant app running in production which has a version code of 1 and a version name of 1.0:

instant app

And now I wanted to upload a newer version of the instant app APKs, but I was held off due to this error that the Google Play Console prompts me:

upload error

I tried changing the version code & name in the build.gradle file of the installed app's module, but to no avail. I also tried adding this piece of code :

android {
    defaultConfig {
        versionCode 2
        versionName '1.1'
    }
}

to the build.gradle file of the instant app's module, but it still yields the same error. So my question is, how can I change the version code & the version name of an instant app ?

Mohammed Aouf Zouag
  • 17,042
  • 4
  • 41
  • 67
  • 1
    Don't you need to change the `versionCode` and `versionName` in the AndroidManifest.xml? https://developer.android.com/guide/topics/manifest/manifest-element.html – Bruno Bieri Apr 18 '18 at 09:16
  • I've never really changed version codes before through the manifest as it seems like Gradle is the way, but I don't think in this case it would work, since the problem is instant-app-related, and considering the fact that the instant app module has no AndroidManifest.xml – Mohammed Aouf Zouag Apr 18 '18 at 09:29

1 Answers1

6

I found the solution. I had to change the version code & name in all of the build.gradle files of the feature modules (including the base one). If you miss a certain feature module, you'll get this error in the Play Console:

error

Mohammed Aouf Zouag
  • 17,042
  • 4
  • 41
  • 67