Upload failed: You need to use a different version code for your APK because you already have one with version code
<p><strong>THE SITUATION:</strong></p>

<p>Sorry in advance if this question has been asked already three times. But none of those solutions are working for me.</p>

<p>I need to upload a new version to Google Play of my Ionic app. The upload process it has always worked fine but this time i get this error:</p>

<pre><code>You need to use a different version code for your APK because you already have one with version code 101078.
</code></pre>

<p><strong>THE PUBLISHING PROCESS:</strong></p>

<p>I am not using Android Studio. </p>

<p>To publish the app i was simply building and signing the app through the command line and then upload it in the Google Developer Console.</p>

<p>For a new version i was simply updating the version number in the config.xml before creating the apk.</p>

<p><strong>APP VERSIONS:</strong></p>

<p>Old version: (status published on Google Play) 1.1.7 Code version: 101078</p>

<p>New version: (trying to upload on Google Play) 1.1.10</p>

<p><strong>ATTEMPTS TO RESOLVE:</strong></p>

<p>I have tried to manually set the Code version to higher number.
At the moment i have this settings in the ./config.xml:</p>

<pre><code>&lt;widget id="com.myapp.myapp" version="1.1.10" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
</code></pre>

<p>In the file ./platforms/android/AndroidManifest.xml I manually change the settings to:</p>

<pre><code>&lt;manifest android:hardwareAccelerated="true" android:versionCode="101079" android:versionName="1.1.10" package="com.meetinghand.meetinghand" xmlns:android="http://schemas.android.com/apk/res/android"&gt;
</code></pre>

<p>But after i run <code>cordova build --release android</code> that value is automatically reset to android:versionCode="10110" ...</p>

<p><strong>RUNNING AAPT:</strong></p>

<p>Running the sdk tool aapt on the apk file i get the following:</p>

<p>name='com.myapp.myapp' versionCode='101078' versionName='1.1.7' platformBuildVersionName='6.0-2704002'
sdkVersion:'16'
targetSdkVersion:'22'</p>

<p><strong>THE QUESTION:</strong></p>

<p>What's going on?</p>

<p>How exactly is the versionCode set? Can I hardcode it? Why, no matter what I do, does the versionCode remain at 101078?</p>

<p>Why is versionName 1.1.7 and not 1.1.10 as it is clearly stated in the config.xml?</p>

<p>I don't know what else can I do.</p>

<p>If you solve this riddle I will build a sculpture in your honor!</p>

<p>Thank you!</p>

<p><strong>EDIT:</strong></p>

<p>In the end i decided to uninstall CrossWalk because didn't strictly need its benefits. In this way the issue was resolved and I could upload the new version.</p>

<p>I could indeed hardcode the code version inside the config.xml as pointed out by @e666:</p>

<pre><code>&lt;widget android-versionCode="101079" id="com.myapp.myapp" version="1.1.10" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
</code></pre>

<p>The versionCode was not overwritten by Crosswalk but was properly set as 101079 and in this way i could upload the apk as new version.</p>

<p>If you still want to keep Crosswalk and upload the new version you can do it by switching to Advanced Mode in the Google Developer Console.
Keep in mind the Crosswalk will export two apk (armv7 and x86) and you will need to upload both.</p>

<p>For more reference about how to do you may check out this answer:</p>

<p><a href="https://stackoverflow.com/questions/16060655/what-does-this-google-play-apk-publish-error-message-mean">What does this Google Play APK publish error message mean?</a></p>