No build step for Android



  • Hi,

    I am trying to build android app from QT for last 7 days but I am unable to figure out what is missing
    Please check

    QT Creator 5.8
    Windows 7

    I have installed 32bit ndk and shortened its path too to C:\NDK

    I am getting below error on running the project

    Cannot find the android build step.
    Error while building/deploying project untitled14 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.8.0 for Android armv7))
    When executing step "Deploy to Android device"


  • Moderators

    Hi and welcome to the Qt forum,

    What other paths did you set in Qt Creator Options > Devices > Tabblad Android?

    Did you set the paths for JDK, SDK, Ant or Gradle?
    And where do they point to, meaning what's inside it? Did you download and install JDK, SDK, Ant...

    Eddy



  • @Eddy Hi Eddy,

    Thanks for quick reply.
    I did set paths for ndk , sdk and ant. I can build it without errors but have issues while trying to run/deploy it. (see 2nd the screenshot)
    I am attaching the screenshots

    0_1496067664305_upload-34edb8dc-c06d-4ae0-a6ca-0b9931c0c84e

    0_1496067722617_upload-4228d533-666e-46b6-bfd1-6abd26883e3d


  • Moderators

    Hi Avtansh,

    Unfortunately, we cannot see your image.

    Please follow the instructions in this topic to add it.

    Eddy



  • @Eddy

    Image 1
    Image 2

    I have attached image links as per description given on link. Nice to see simple and space efficient image posting.


  • Moderators

    I can see on your screenshot the device is recognized (green circle above run button)

    Can you show your settings in Projects > Build settings?

    Eddy



  • Yes sure.

    Image 3
    !Image 4


  • Moderators

    It looks like you didn't set up an apk.

    Did you use the AVD manager / SDK manager located in your SDK folder?

    Edit : please follow the instructions in the Qt Creator manual



  • @Eddy Hi Eddy,

    I have used sdk manager to install the following packages from android studio and then pointed the location to path where where android studio downloads. The path can be seen in previous images.

    Sdkmanager gui has been turned off by google. So i use android studio for downloading them. Please suggest an alternate way. Getting ready qt for Android should not be this much time consuming. Can you please give one complete package of qt with all the settings and packages for android. It would be of great help

    Image5
    Image6


  • Moderators

    Sdkmanager gui has been turned off by google. So i use android studio for downloading them. Please suggest an alternate way.
    

    I didn't know that. Thanks for the information. I checked the version of the SDK manager on my system : revision 24.3.4 which i downloaded some years ago and obviously is still working. You could install this older version to get the SDK manager like it was before.
    Edit : i see a launch SDK manager link in your screenshot, doens't this start the SDK manager?

    Can you please give one complete package of qt with all the settings and packages for android. 
    

    That's difficult to do, because all the installation paths you showed us are set using the options in Qt Creator.


  • Moderators

    Hi,

    Here is a screenshot of the apk build settings you lack:
    link to screenshot

    This is done automatically normally, no manual interaction here. So we have to find out why it isn't happening on your system.


  • Moderators

    So we have to find out why it isn't happening on your system.
    

    Do you know :
    the KDAB tutorial : Qt on Android which shows step by step how to setup the environment.
    could you follow the instructions there. It's a very complete tutorial, with several episodes explaining the internals.
    We might find what we are missing that way.

    You're right, it should be that time consuming. But once your system is zet up, you're good to go for the future.
    Out of curiosity : which device are you aiming to work?



  • I have planned to use QT for One plus X device. As a part of project I have used QT for Raspberry Pi 3 too. On Raspberry it worked fine. However for Host and client setup I faced issues in Qt for that can you please edit the tutorials. I found out the missing info on setup QT on host.
    I am giving you my information that I collected from experience. I hope it will help community
    https://drive.google.com/drive/folders/0B0DUad0bfbaiY21ZWmFZRnByVzg?usp=sharing
    I have written some tweaks in Readme file on the link

    I will look into the tutorial link what is missing specific on my system and update you.


  • Moderators

    Thanks for sharing with us.

    I hope we could help you in the right direction.

    If you succeed, please let us know. If you have any specific questions we will gladly help where we can.

    Eddy



  • Hi Eddy,

    I tried the link given by you followed the steps but it is not working.
    Now I am trying steps given at https://wiki.qt.io/Android
    I am trying it on Ubuntu this time but I am getting following error at running make command
    Image 7



  • Fixed problem.
    Main problem was due to removal of template/gradle directory by google. Just download old version and copy gradle. It was fixed in 5.9 beta version as per qt bug report. However I have not tested beta version.

    Thanks Eddy for prompt response


    Regards,
    Avtansh Sharma


  • Moderators

    @Avtansh-Sharma You're welcome.

    Thanks for posting your solution back to us!
    Good to know that google changed some things. So i was lucky since I was using an old installation.

    Could you post the link to the bug report here. That might help others as well.

    And last but not leased : you have the pleasure of marking this topic as solved by clicking on the Topic Tools button on the right.

    Eddy



  • Hi,

    Below is the bug link

    https://bugreports.qt.io/browse/QTBUG-59237


    Regards,
    Avtansh Sharma


Log in to reply
 

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