XML Manifest: Unity and Android

Hello everyone I already looked for similar topic on Internet but i can’t find anything that works.

I created a Unity game for android and i put it on the play store, I want to update the game but when I upload my APK file to the play store i have an error because an APK already have 1 on his “versionCode”.

I don’t understand because in my Unity Asset folder I have a Plugins folder with an Android folder wich contain my AndroidManifest.xml AND this androidmanifest.xml have “2” on VersionCode … So the playstore is not supposed to tell me that I already have an APK with 1 on versionCode

Project Screenshot:

49095-ggr.png

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.DiiosGames.FlappyKoin" android:theme="@android:style/Theme.NoTitleBar" android:versionName="1.0" android:versionCode="2" android:installLocation="preferExternal">
  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
  <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false" android:isGame="true" android:banner="@drawable/app_banner">
    <activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:screenOrientation="landscape" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
      </intent-filter>
      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
      <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
    </activity>
  </application>
  <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="22" />
  <uses-feature android:glEsVersion="0x00020000" />
  <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
  <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
  <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
</manifest>

Version code is nothing but you build number. With every new update that you push to the play store you have to increment your build number. This can be done by incrementing the value of the ‘Bundle Version Code’ in the Android Player settings.

To do this goto ‘File’-> ‘Build Settings’-> Select ‘Android’.

Then click on the ‘Player settings’ below.

In the inspector click on ‘Other Settings’ and scroll down to find ‘Bundle Version Code’. [Assuming it to be ‘1’ change it to ‘2’].

Save your settings with a Ctrl+S.

That value should be updated on every update that you push to the play store.

Hope it helps :slight_smile: