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
QtWS25 Last Chance

Trouble building a release copy for android

Scheduled Pinned Locked Moved Solved Installation and Deployment
apkandroidrelease versio
13 Posts 3 Posters 5.5k 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.
  • K Offline
    K Offline
    kgregory
    wrote on last edited by koahnig
    #1

    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 1 Reply Last reply
    0
    • K kgregory

      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 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 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
        0
        • K kgregory

          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 last edited by
          #4

          Is this a limitation of the community edition?

          jsulmJ 1 Reply Last reply
          0
          • K kgregory

            Is this a limitation of the community edition?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on 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
            0
            • K Offline
              K Offline
              koahnig
              wrote on 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
              • jsulmJ jsulm

                @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 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.

                jsulmJ 1 Reply Last reply
                0
                • K kgregory

                  @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.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 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 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
                    0
                    • K kgregory

                      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 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 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
                        1
                        • K kgregory

                          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 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
                          2
                          • K koahnig

                            @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 last edited by
                            #13

                            Here is the solution.

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

                            1 Reply Last reply
                            2

                            • Login

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