0

I have a normal installable app on my git main branch. Now I want to create an Instant version of that game on a branch. I have done everything as described here. And at version-codes it also says:

It's OK to develop your instant app and your installable app in two separate Android Studio projects.

This is, I guess, the same as having a separate branch.

This is what I have changed:

AndroidManifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.my.app.package"
    xmlns:dist="http://schemas.android.com/apk/distribution"
    android:targetSandboxVersion="2">

    <dist:module dist:instant="true" />

    <application ...>

        <meta-data android:name="com.google.android.gms.instant.flavor" android:value="1337"/>
        ...
    </application>
</manifest>

The targetSandboxVersion, dist:module and the meta-data.

In build.gradle I have added implementation "com.google.android.gms:play-services-instantapps:17.0.1" and set versionCode to 1.

But when I upload the app bundle it says that versionCode 1 is already used. But according to the quote above I think it should be possible to upload a bundle that only has the instant version. Am i doing something wrong?

L3n95
  • 1,505
  • 3
  • 25
  • 49

1 Answers1

0

For Instant App use version code lower than the version code of the standard/not-instant app. It allows install of the standard version from the Instant version.

If you already have uploaded standard version, increase it's version code to eg. 100 and re-upload the standard version. Than use version code lower than 100 for the instant app.

Make sure app-bundle or apk with specific version code was not already uploaded, this includes also apk-s and bundles unsuccessfully uploaded and includes all versions of the app, both standard and instant.