Where to give the path of Gradle



  • Hi all,

    I've installed Gradle 3.3 on my Windows machine and the following is the Android tab of Qt Creator:

    alt text

    This is where my Gradle folder is:
    C:\Users\CS\Desktop\Documents\Andro_Qt\gradle-3.3

    Now onto what place or places should I paste the above path please to use Gradle?



  • Is the only required place on the Android Studio?


  • Lifetime Qt Champion

    Hi,

    IIRC, it's already provided with the Android SDK under tools folder.



  • I don't know where that address is, on qt Creator, Android Studio, SDK Manager or etc.

    I have Gradle 3.3 installed on my windows machine:
    alt text

    And I've put the path of Gradle for just these sections on Android Studio, as follows:
    alt text

    The problem is that I recently get this error when I run Android studio:
    alt text

    I tried to fix this but no prosperity yet. :(

    PS: I had installed some required pachages for SDK and now, too, it's installing/updating some new ones else. I don't know if installing/updating will solve the issue or not.


  • Moderators

    @tomy Why do you want to use your own Gradle installation?
    Regarding the error: why did you activate "Offline work"?



  • I used my Gradle because I thought it's more complete/update than the Android Studio's one.

    And about the second question: Honestly, since many times I'm not connected to the Internet when using the Qt Creator (which is apparently in communication with the settings of Android Studio) when developing apps for android, so I thought that option should be checked.


  • Moderators

    @tomy Sorry, but what you are doing is asking for problems. You should use pre-installed Gradle (it is even marked as recommended) unless you really need your own installation and you know what you are doing. And don't activate "Offline work" - if you do not have internet connection then you're offline anyway, but since Gradle sometimes needs to download some stuff (don't ask me why) you will need to disable this option.



  • OK, I don't ask why! :-)

    I installed Gradle 3.3 (with its not easy process) because that docs have told me this!!!!!!

    After doing what you said, the error was gone.
    thanks


  • Moderators

    @tomy Which doc is it?
    I guess a default Gradle installation does not contain everything to keep it small. If something is needed and is not yet installed it is downloaded.



  • You say if I rely on the current settings, it will be enough (and for some reason, if it's needed, it will install the required stuff itself)?

    When I asked to run my own Windows app for Android, guys recommended that I use the Docs. There it was written I should install Gradle.


  • Lifetime Qt Champion

    I concur with @jsulm, last time I used gradle for my project, the first thing it did was to download everything that it needed to continue the work.



  • OK, I say if I leave the settings as they are (like below), it's enough, yes??
    alt text


  • Moderators

    @tomy Yes should be fine, just try.
    I asked which doc you're following because maybe it should be fixed (to not to ask users to install their own Gradle).



  • @jsulm
    I think it was this.


  • Moderators

    @tomy To be honest I do not see where it says you have to install Gradle by yourself.



  • It says:

    Requirements

    To use Qt Creator to develop Qt applications for Android, you need the following:

    Java SE Development Kit (JDK) version 6, or later
    A build tool for building application packages for Android devices:
    Apache Ant 1.8.0, or later
    Gradle
    ...

    And when the user clicks on Gradle, it takes them to this page:
    https://gradle.org/
    Where they are presumably asked to install Gradle

    Anyway, the problem is seemingly solved for me and if you like make a suggestions for the holders of Docs please to modify this.


  • Moderators

    @tomy Yes, it says Gradle is needed, but if you read further then it says that it is integrated:
    "On Android, applications are distributed in specially structured type of ZIP packages called APK. You can use either Ant or Gradle to build APKs. Using Gradle has the following benefits:

    It is 25 to 50 percent faster than Ant when rebuilding packages.
    It is integrated with Android Studio."
    

    The doc does not say you have to install it.
    If you read the documentation you should not immediately install all requirements listed. Instead you should read further there all set-up steps are explained.



  • @jsulm said in Where to give the path of Gradle:

    The doc does not say you have to install it.
    If you read the documentation you should not immediately install all requirements listed. Instead you should read further there all set-up steps are explained.

    that is right,

    warnings come after the instructions

    :-)


  • Moderators

    @J.Hilk Actually list of requirements is not installation instruction. Installation instructions come afterwards :-)



  • They could have added a simple line like:
    If you install Android Studio and want to use Gradle instead of Ant, "you do not need to install it manually" because the Android Studio contains it itself.

    That line should have been added at, of course, the beginning not the end.

    This is my opinion.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.