Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Android 32 and 64 bit version package error



  • I have application in Google play, compiling on Qt 5.12 32 bit. When I try upload new version application, compiled on Qt 5.15 I get error:

    **Your APK or Android App Bundle needs to have the package name *:
    You need to use a different version code for your APK or Android App Bundle because you alreadv have one with version nada 1



  • @Vitaliy
    the version codes of the 32-bit and 64-bit apks should be consecutive, while the version name should be the same.
    E.g: for my application, both have version name 2.8, but version code of 32-bit is 290, and version code of 64-bit is 291


  • Qt Champions 2016



  • Thanks for answers. Qt 5.15 does not have separate compilation of 32 and 64 bit android applications. Instead, should the aab format include 32 and 64 bit variant application?


  • Qt Champions 2016



  • Ok, Thanks!



  • This part seems pretty clear:

    You need to use a different version code ...

    Therefore, I assume the confusion stems from why the AAB is out of compliance?

    Have you unpacked the AAB to see what is inside? That seems worthwhile. If you unpack the AAB and locate version information inside of it, perhaps this will provide insight into what Qt chose to populate for you. (Here is a post on stackoverflow about unzipping an AAB).

    So far, I have only uploaded to Google play using "fat APK" (APK file with multiple cross-platform binaries), so I certainly am not an expert.

    I have this section in my pro file, following the advice from Qt online docs:

    android {
        DISTFILES += \
            $$top_srcdir/src/lib/android/AndroidManifest.xml
    
        ANDROID_PACKAGE_SOURCE_DIR = $$top_srcdir/src/lib/android
    }
    

    And every time I upload a new fat APK, I edit the manifest before building the new release. Edits like so:

    diff --git a/src/lib/android/AndroidManifest.xml b/src/lib/android/AndroidManifest.xml
    index c83c9cc..8b72b2e 100644
    --- a/src/lib/android/AndroidManifest.xml
    +++ b/src/lib/android/AndroidManifest.xml
    @@ -3,8 +3,8 @@
     <!-- versionCode must be an ever-increasing integer used by play store -->
     <manifest package="org.anon.myapp"
               xmlns:android="http://schemas.android.com/apk/res/android"
    -          android:versionName="2020-Jun-23"
    -          android:versionCode="1"
    +          android:versionName="2020-Jun-30"
    +          android:versionCode="2"
               android:installLocation="auto">
         <uses-permission android:name="android.permission.INTERNET" />
         <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    

Log in to reply