Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android Manifest version update
Forum Updated to NodeBB v4.3 + New Features

Android Manifest version update

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 3 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • KroMignonK Offline
    KroMignonK Offline
    KroMignon
    wrote on last edited by
    #1

    Hi all,

    there are some escape sequences which can be used in AndroidManifest.xml to automatically set values according to Qt project settings like:

    • -- %%INSERT_APP_LIB_NAME%% --
    • -- %%INSERT_APP_NAME%% --

    Do somebody know if a sequence exists to insert VERSION which is defined PRO file?
    Is it possible to get an exhaustive list of all available escape sequences?

    It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

    KroMignonK 1 Reply Last reply
    0
    • KroMignonK KroMignon

      Hi all,

      there are some escape sequences which can be used in AndroidManifest.xml to automatically set values according to Qt project settings like:

      • -- %%INSERT_APP_LIB_NAME%% --
      • -- %%INSERT_APP_NAME%% --

      Do somebody know if a sequence exists to insert VERSION which is defined PRO file?
      Is it possible to get an exhaustive list of all available escape sequences?

      KroMignonK Offline
      KroMignonK Offline
      KroMignon
      wrote on last edited by KroMignon
      #2

      @KroMignon I reply to myself, I think this could be useful for other developers.

      Escape sequences which I found (extract from source code!):

      • -- %%INSERT_APP_NAME%% -- correspond to qmake setting TARGET
      • -- %%INSERT_APP_LIB_NAME%% -- (same as above)
      • -- %%INSERT_VERSION_NAME%% -- correspond to qmake setting ANDROID_VERSION_NAME
      • -- %%INSERT_VERSION_CODE%% -- correspond to qmake setting ANDROID_VERSION_CODE

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      K 1 Reply Last reply
      4
      • KroMignonK KroMignon

        @KroMignon I reply to myself, I think this could be useful for other developers.

        Escape sequences which I found (extract from source code!):

        • -- %%INSERT_APP_NAME%% -- correspond to qmake setting TARGET
        • -- %%INSERT_APP_LIB_NAME%% -- (same as above)
        • -- %%INSERT_VERSION_NAME%% -- correspond to qmake setting ANDROID_VERSION_NAME
        • -- %%INSERT_VERSION_CODE%% -- correspond to qmake setting ANDROID_VERSION_CODE
        K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        @KroMignon

        While looking for a way to use INSERT_VERSION_NAME and INSERT_VERSION_CODE I came across your post.

        I have added to my .pro

        ANDROID_VERSION_NAME = "3"
        ANDROID_VERSION_CODE = 2.4.0
        

        This is similar as I used before in creator's manifest editor.
        However, when rerun qmake and deploy my app I got

        * What went wrong:
        Execution failed for task ':processDebugResources'.
        > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
           > Android resource linking failed
             R:\build-App1-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_2_for_Android-Release\android-build\build\intermediates\merged_manifests\debug\AndroidManifest.xml:2: AAPT: error: invalid android:versionCode '2.4.0'.
        
        

        I have checked also with same result

        ANDROID_VERSION_NAME = "3"
        ANDROID_VERSION_CODE = "2.4.0"
        

        What is missing?

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          The problem was between keybord and chair. The values have to be exchanged.

          ANDROID_VERSION_CODE = "3"
          ANDROID_VERSION_NAME = "2.4.0"
          

          Then it is working again.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • R Offline
            R Offline
            RoachLin
            wrote on last edited by
            #5

            I think this would be also helpful to you
            https://doc.qt.io/qt-6/android-manifest-file-configuration.html

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved