Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Trouble building a release copy for android
Forum Update on Tuesday, May 27th 2025

Trouble building a release copy for android

Scheduled Pinned Locked Moved Solved Installation and Deployment
apkandroidrelease versio
13 Posts 3 Posters 5.5k 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.
  • K kgregory
    13 Oct 2017, 22:03

    I've been debugging my android app in QT Creator using Quick2 and I'm ready to build a release copy. I set QT Creator into "Release" mode (it had been in debug mode) and hit the build button. However it still produces a debug copy of my app. (Google play won't let me upload the .apk because it is a "debuggable .apk")

    I'm admittedly clueless on how this process works. Can anyone provide any tips on how to get a release copy?

    K Offline
    K Offline
    koahnig
    wrote on 14 Oct 2017, 10:18 last edited by
    #2

    @kgregory

    Is the size of the release version different from your debug version?
    You may have to rerun qmake and rebuild for getter a release version.

    BTW the name of .apk may be changed to anything. It is an archive.

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

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kgregory
      wrote on 14 Oct 2017, 19:29 last edited by kgregory
      #3

      They are slightly different sizes. 13,970kB for debug and 13,731kB for release. Both files have the word "debug" on their name. The release one has the word "release" on it's build folder name while the debug has "debug" in the folder name. Google play won't accept either one of them.

      Literally all I'm doing to switch between debug and release builds is clicking the button in the lower left, selecting either release or debug then clicking the build button below. Is there something else I should be doing to switch modes?

      0_1508009378174_0827a5e9-7724-449b-a499-99cd4d0dc399-image.png

      K 1 Reply Last reply 17 Oct 2017, 03:54
      0
      • K kgregory
        14 Oct 2017, 19:29

        They are slightly different sizes. 13,970kB for debug and 13,731kB for release. Both files have the word "debug" on their name. The release one has the word "release" on it's build folder name while the debug has "debug" in the folder name. Google play won't accept either one of them.

        Literally all I'm doing to switch between debug and release builds is clicking the button in the lower left, selecting either release or debug then clicking the build button below. Is there something else I should be doing to switch modes?

        0_1508009378174_0827a5e9-7724-449b-a499-99cd4d0dc399-image.png

        K Offline
        K Offline
        kgregory
        wrote on 17 Oct 2017, 03:54 last edited by
        #4

        Is this a limitation of the community edition?

        J 1 Reply Last reply 17 Oct 2017, 04:41
        0
        • K kgregory
          17 Oct 2017, 03:54

          Is this a limitation of the community edition?

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 17 Oct 2017, 04:41 last edited by
          #5

          @kgregory To me it looks like your release build isn't really a release build: release build should be much smaller than debug build. You should check the settings for the release build.
          There are no limitations in the open source Qt version. There are modules only available in the commercial version, but everything else is same.

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

          K 1 Reply Last reply 18 Oct 2017, 02:53
          0
          • K Offline
            K Offline
            koahnig
            wrote on 17 Oct 2017, 08:30 last edited by
            #6

            There is I posted earlier this year similar questions on size and naming of android apk
            Finally I could find the thread.

            The size difference between debug and release versions of an application for android is not as drastic as with linux/windows apps. At least when looking at the overall size. Probably best is to compare the part in the .apk file which is not part of Qt libs. My application had about 7 MB, but most of it are not my application. Therefore, the question is,if there are bigger Qt libs bound into it.

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

            1 Reply Last reply
            0
            • J jsulm
              17 Oct 2017, 04:41

              @kgregory To me it looks like your release build isn't really a release build: release build should be much smaller than debug build. You should check the settings for the release build.
              There are no limitations in the open source Qt version. There are modules only available in the commercial version, but everything else is same.

              K Offline
              K Offline
              kgregory
              wrote on 18 Oct 2017, 02:53 last edited by
              #7

              @jsulm I suspected as much. What settings should I be looking at? I'm poking through the settings but nothing is popping out to me as obvious.

              J 1 Reply Last reply 18 Oct 2017, 04:21
              0
              • K kgregory
                18 Oct 2017, 02:53

                @jsulm I suspected as much. What settings should I be looking at? I'm poking through the settings but nothing is popping out to me as obvious.

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 18 Oct 2017, 04:21 last edited by
                #8

                @kgregory In QtCreator on the left side click on "Projects", select "Build" and then "Release". Check the build steps.

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

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kgregory
                  wrote on 20 Oct 2017, 04:11 last edited by
                  #9

                  I tried playing around with these build settings a bit and I'm still not having any luck. Is there anything obvious here?

                  0_1508472702404_9126a6c4-0b26-401a-afc6-42340e73444a-image.png

                  K 1 Reply Last reply 20 Oct 2017, 08:33
                  0
                  • K kgregory
                    20 Oct 2017, 04:11

                    I tried playing around with these build settings a bit and I'm still not having any luck. Is there anything obvious here?

                    0_1508472702404_9126a6c4-0b26-401a-afc6-42340e73444a-image.png

                    K Offline
                    K Offline
                    koahnig
                    wrote on 20 Oct 2017, 08:33 last edited by
                    #10

                    @kgregory

                    I have compare with my settings. I did not find a difference.

                    Also still as in the post already mentioned above (https://forum.qt.io/topic/80168/size-and-naming-of-android-apk) the outcome of a release linkage is still "android-build-debug.apk".

                    Probably a better option for discussing this topic is https://groups.google.com/forum/#!forum/android-qt

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

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kgregory
                      wrote on 24 Oct 2017, 04:12 last edited by
                      #11

                      Found the answer: there is a guide on publishing for Android. Following those steps to build a manifest and sign the .apk solved my problem. Thanks for the replys!

                      K 1 Reply Last reply 24 Oct 2017, 13:22
                      1
                      • K kgregory
                        24 Oct 2017, 04:12

                        Found the answer: there is a guide on publishing for Android. Following those steps to build a manifest and sign the .apk solved my problem. Thanks for the replys!

                        K Offline
                        K Offline
                        koahnig
                        wrote on 24 Oct 2017, 13:22 last edited by
                        #12

                        @kgregory

                        Good to know that your problem is solved.

                        I would be good to share a link to the place where you found the solution. This will help others.

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

                        K 1 Reply Last reply 24 Oct 2017, 21:03
                        2
                        • K koahnig
                          24 Oct 2017, 13:22

                          @kgregory

                          Good to know that your problem is solved.

                          I would be good to share a link to the place where you found the solution. This will help others.

                          K Offline
                          K Offline
                          kgregory
                          wrote on 24 Oct 2017, 21:03 last edited by
                          #13

                          Here is the solution.

                          http://doc.qt.io/qt-5/publishtogoogleplay.html

                          1 Reply Last reply
                          2

                          11/13

                          24 Oct 2017, 04:12

                          • Login

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