Cannot find template directory /root/Android/Sdk/tools/templates/gradle/wrapper



    1. I have installed all the SDK thing through android studio.
    2. then changed the gradle path in the android studio to the local path, tested it android device(physical device not AVD) and it worked like a charm.

    Now i move Qt 5.6.1 (GCC 4.9.1 20140922 (Red Hat 4.9.1-10), 64 bit)

    1. I went to options > android and set all SDK, NDK ant ant path (also ticked use gradle insted of ant).
    2. then i created a created a QT Quick application project, and it managed to pick-up android kits.

    So when i try to test it, get these error:

    Cannot find template directory /root/Android/Sdk/tools/templates/gradle/wrapper
    09:22:36: The process "/opt/QT_creator/5.6/android_armv7/bin/androiddeployqt" exited with code 3.
    Error while building/deploying project pricemate (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.6.2))
    When executing step "Build Android APK"
    09:22:36: Elapsed time: 00:02.

    0_1502178197313_Screenshot from 2017-08-08 09-42-57.png



  • Ok. i managed to find a temporary solution.

    i went to the zip file of android studio that i downloaded and copied the templates folder to the installation folder of my Sdk/tools .

    and what happen now is:
    it(Qt) will download a copy of gradle everytime i create a new and build a new qt project, and put it in the project folder.

    But because i like to try thing, i copy the gradle folder from the old project to the new one and it works fine.

    So i`m still looking for help on how can i tell QT (or android sdk) to use gradle on my computer and stop wasting my time downloading a new copy of gradle everytime.

    Now because you have a clue on what my question was i hope someone will help me out.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you already read the Connecting Android Devices chapter of Qt Creator's documentation ?

    It explains what you need to do regarding cradle also. Note that the Android folks have modified the SDK content quite radically several times in several the latest releases so you have to take that into account also. You have some information about that in the linked documentation.


Log in to reply
 

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