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. Reduce apk size in android Qt/Qml project
Forum Updated to NodeBB v4.3 + New Features

Reduce apk size in android Qt/Qml project

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
12 Posts 3 Posters 1.1k Views
  • 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.
  • T Offline
    T Offline
    tkoka
    wrote on last edited by tkoka
    #1

    Hi,
    I using ArcGIS_Runtime_SDK_Qt_Windows_100_14_01sdk. Im using Qt Creator 7.0.2 Based on Qt 6.2.3 (MSVC 2019, 64 bit) and Kits Qt 5.15.2 (Android Clang Multi -Abi and MinGW 64-bit ) .

    We made an application that makes simple directions using ArcGISRuntime in Qml, so we get an apk output of 180 MB.
    In our opinion, the file (.apk) size is too big for the user.How best to reduce apk size for users's download from Android Market ?

    Thanks

    jsulmJ 1 Reply Last reply
    0
    • T tkoka

      Hi,
      I using ArcGIS_Runtime_SDK_Qt_Windows_100_14_01sdk. Im using Qt Creator 7.0.2 Based on Qt 6.2.3 (MSVC 2019, 64 bit) and Kits Qt 5.15.2 (Android Clang Multi -Abi and MinGW 64-bit ) .

      We made an application that makes simple directions using ArcGISRuntime in Qml, so we get an apk output of 180 MB.
      In our opinion, the file (.apk) size is too big for the user.How best to reduce apk size for users's download from Android Market ?

      Thanks

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @tkoka Did you check what are the biggest files inside the APK?
      Did you build in release mode?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tkoka
        wrote on last edited by tkoka
        #3

        Hi,

        I build in release mode. I checked APK files now, lib folder is the bigest file here are pictures below:

        apkFile.GIF

        Here is also lib folder inside below picture:

        libFile.GIF

        J.HilkJ 1 Reply Last reply
        0
        • T tkoka

          Hi,

          I build in release mode. I checked APK files now, lib folder is the bigest file here are pictures below:

          apkFile.GIF

          Here is also lib folder inside below picture:

          libFile.GIF

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @tkoka did you also sign the apks? they are only striped of their debug stuff when officially signed


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tkoka
            wrote on last edited by
            #5

            I haven't gotten to the signing stage yet. Does .apk size decrease after creating or adding existing keystore and certificate and clicking Sign Package?

            J.HilkJ 1 Reply Last reply
            0
            • T tkoka

              I haven't gotten to the signing stage yet. Does .apk size decrease after creating or adding existing keystore and certificate and clicking Sign Package?

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #6

              @tkoka said in Reduce apk size in android Qt/Qml project:

              Does .apk size decrease after creating or adding existing keystore and certificate and clicking Sign Package

              noticeably, yes


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tkoka
                wrote on last edited by
                #7

                I will write again when the signature part is completed. Thanks for information.

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tkoka
                  wrote on last edited by tkoka
                  #8

                  @J-Hilk , before clicking Sign Package Release apk size ise 154 MB , after create new keystore clicking Sign Package building (Release mode) apk 145 MB.
                  Is this normal? is there any other way to shrink apk?

                  J.HilkJ 1 Reply Last reply
                  0
                  • T tkoka

                    @J-Hilk , before clicking Sign Package Release apk size ise 154 MB , after create new keystore clicking Sign Package building (Release mode) apk 145 MB.
                    Is this normal? is there any other way to shrink apk?

                    J.HilkJ Offline
                    J.HilkJ Offline
                    J.Hilk
                    Moderators
                    wrote on last edited by
                    #9

                    @tkoka well, its something. :/

                    But I also can't help but notice your lib folder contains 3 architectures, are you really checking the size of an apk or an aab ?

                    because thats normal, an aab contains up to 4 copied of your app, one for each supported platform architecture, the user will actually only download the one "optimal" for their system


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      tkoka
                      wrote on last edited by
                      #10

                      I just created the file (android-build-release.aab) 145 MB is file. But as far as I understand, you are telling the user that it will decrease 3 times according to the system he/she uses. İn short, when the user downloads, the "optimal" system will be used and the size will be reduced.

                      J.HilkJ 1 Reply Last reply
                      0
                      • T tkoka

                        I just created the file (android-build-release.aab) 145 MB is file. But as far as I understand, you are telling the user that it will decrease 3 times according to the system he/she uses. İn short, when the user downloads, the "optimal" system will be used and the size will be reduced.

                        J.HilkJ Offline
                        J.HilkJ Offline
                        J.Hilk
                        Moderators
                        wrote on last edited by
                        #11

                        @tkoka correct, that is the idea behind aab's

                        Google introduced that, so that the different app's can share common resources, for example images. Therefore overall reducing the size that google needs to provide to store all apps, but keeping the size for the user identical.

                        You as a developer now upload one massive aab instead of multiple smaller apk's


                        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                        Q: What's that?
                        A: It's blue light.
                        Q: What does it do?
                        A: It turns blue.

                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          tkoka
                          wrote on last edited by tkoka
                          #12

                          @J-Hilk, Thank you for the information.

                          After uploading the application to google play, I'll keep track of what sizes users download the app and post it here.

                          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