Values of platformBuildVersionCode (versionCode) and platformBuildVersionName (versionName) are always replaced with the values of targetSDKVersion and targetSDK in apk's AndroidManifest file.
I have tried below ways.
Modified these fields from build.gradle
Tried to build from terminal and changed value of these fields from terminal.
https://forum.qt.io/topic/52250/how-can-i-stop-qtcreator-from-overwriting-my-androidmanifest-xml
This issue is seen only for Qt 5.9. I tested on Qt 5.9.4 and Qt 5.9.8. Works perfectly fine on Qt 5.12.2.
Ref: https://android.googlesource.com/platform/frameworks/base/+/ad2d07d
What's platformBuildVersionCode and platformBuildVersionName in Extracted Apk's
These options are not working for me. I want to keep these values as it is in apk's manifest also with Qt 5.9.8.