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. When Android gradle build creates android-build folder with contents?

When Android gradle build creates android-build folder with contents?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
10 Posts 2 Posters 2.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.
  • G Offline
    G Offline
    Gourmet
    wrote on 20 Nov 2018, 15:34 last edited by Gourmet
    #1

    Before summer I created Android apps using ant. But now it is not supported by QtCreator. At July I have started turn all my apps to gradle. I am not a keen in gradle but this is needed to create aps for Android API level 26 as required by Google. I have successfully remake one app. But then I found a bug in Android libs. Therefore I have paused further remake. Recently Google fixed this bug and I continued remake. But I cannot remember all steps for ant to gradle turn... At summer I wrote notes but probably missed something. In first one app the build process creates folder android-build and writes inside it all files needed for APK creation and the APK itself. Same behavior I had when used ant - all older apps have this folder with output. But now I do not see android-build folder. Build process stops with the error "no libraries". Anybody who knows well all gradle build steps - please tell me when the android-build must be created and which one QtCreator setting or project line relates to this. I have broken my eyes while comparing working gradle project and non-working one. I do not see difference.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dheerendra
      Qt Champions 2022
      wrote on 20 Nov 2018, 15:47 last edited by
      #2

      "QtCreator->Projects->Build Steps->Build Android APK ->Create Template" Button

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      G 2 Replies Last reply 20 Nov 2018, 16:50
      0
      • D dheerendra
        20 Nov 2018, 15:47

        "QtCreator->Projects->Build Steps->Build Android APK ->Create Template" Button

        G Offline
        G Offline
        Gourmet
        wrote on 20 Nov 2018, 16:50 last edited by Gourmet
        #3

        @dheerendra Of course I used this button to copy needed gradle files - I have edit build.gradle to add link with Google Play Services lib. And I edit gradle.properties to enable manifestmerger. But android-build did not appear - not after Create Template button nor during build works.

        1 Reply Last reply
        0
        • D dheerendra
          20 Nov 2018, 15:47

          "QtCreator->Projects->Build Steps->Build Android APK ->Create Template" Button

          G Offline
          G Offline
          Gourmet
          wrote on 20 Nov 2018, 17:05 last edited by
          #4

          @dheerendra has android-build appear during gradle works or not?

          1 Reply Last reply
          0
          • G Offline
            G Offline
            Gourmet
            wrote on 20 Nov 2018, 18:33 last edited by
            #5

            I found my mistake... It appears because of two paths interferention and was very weird.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              Gourmet
              wrote on 4 Dec 2018, 17:12 last edited by Gourmet 12 Apr 2018, 19:44
              #6

              Damn... I cannot tell why but button Create Template works strangely. Once it creates all set of gradle files but once it creates only some of them. Full set includes:
              <graddle> folder
              gradlew
              gradlew.bat
              build.graddle
              graddle.properties
              graddle.properties~
              local.properties
              local.properties~

              but sometimes when I strike this button and answer No to request replace my AndroidMainfest.xml and lib.xml - it does not create latest 4 files. I tried copy them from another project but without success - new project stops build with error message "Application .pro file not found, APK won't build". Of course all .pro files exist. But sometimes when Moon goes in some unknown angle to Jupiter... Button Create Template copies entire set of gradle files. In this case project builds successfully. I compared directories and files of both projects - they are not different in project settings.

              DAMN!!! Looks like I found the reason. This stupid QtCreator does not select "running" module from previous QtCreator version. It just ignores which one subproject is "running".

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dheerendra
                Qt Champions 2022
                wrote on 4 Dec 2018, 18:28 last edited by
                #7

                @Gourmet said in When Android gradle build creates android-build folder with contents?:

                This stupid QtCreator does not select "running" module from previous QtCreator version. It just ignores which one subproject is "running".

                what option 'running' you are talking about ? Where is it ?

                Dheerendra
                @Community Service
                Certified Qt Specialist
                http://www.pthinks.com

                G 1 Reply Last reply 4 Dec 2018, 19:16
                0
                • D dheerendra
                  4 Dec 2018, 18:28

                  @Gourmet said in When Android gradle build creates android-build folder with contents?:

                  This stupid QtCreator does not select "running" module from previous QtCreator version. It just ignores which one subproject is "running".

                  what option 'running' you are talking about ? Where is it ?

                  G Offline
                  G Offline
                  Gourmet
                  wrote on 4 Dec 2018, 19:16 last edited by
                  #8

                  @dheerendra sorry not "running:. In English just Run or Run Configuration. I work with non-English QtCreator obviously.

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    dheerendra
                    Qt Champions 2022
                    wrote on 4 Dec 2018, 19:39 last edited by
                    #9

                    Got it. Please share the solution here. It helps others as well. After that you can move the issue to SOLVED state.

                    Dheerendra
                    @Community Service
                    Certified Qt Specialist
                    http://www.pthinks.com

                    G 1 Reply Last reply 4 Dec 2018, 19:43
                    0
                    • D dheerendra
                      4 Dec 2018, 19:39

                      Got it. Please share the solution here. It helps others as well. After that you can move the issue to SOLVED state.

                      G Offline
                      G Offline
                      Gourmet
                      wrote on 4 Dec 2018, 19:43 last edited by
                      #10

                      @dheerendra the solution is quite simple - it's just needed before pressing Create Template select in Run Configuration the module containing main() function.

                      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