Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Struggling Android installation for Qt



  • For the past week, I have been struggling to figure out how to run a Qt quick application with the Android kit. I have encountered numerous errors. Earlier, my OpenSSL settings on Android where not working, but I was able to fix it by downloading new OpenSSL files from online. After that, all the settings in Android settings have a checkmark to signify that they are working.
    3185de4a-ec00-44c6-982b-e53d41c00376-image.png
    After that, I tried to run the program with the Android kit. However, unlike for you in the videos, Qt Creator did not auto detect an Android kit. In fact, I have uninstalled and reinstalled Qt numerous times to see if it would detect an Android kit. However, since this still did not work, I manually created my own kit. Here is a screenshot of what I filled out for it:
    2bc1ddd3-4a3f-459a-85b5-415de44a5286-image.png
    However, as you can see on the Qt version section, "Qt 5.15.0 for Android" is considered invalid. I have installed previous versions and the current version of Android numerous times on the Qt maintenance tool but all of them show as invalid. As a result, I changed the Qt version to "5.15.0 MinGW 32-bit".

    When I tried to run the program, I got an error about not finding the gradle scripts. After researching, I found that since my Android SDK is past version 26.0.0, it is not downloaded with the SDK but should have been downloaded when I installed Qt. Since it clearly was not, and downgraded my version of Android SDK tools to one with the gradle scripts. There is still a green checkmark after it, so it was the correct SDK.

    When I tried to run again, my Qt Creator crashes (meaning my laptop exits from Qt Creator immediately). As a result, I only try to build it. When I built it, I get the error that "Android deploy settings file not found, not building an APK. ". I tried researching the problem on the Qt forums and stack overflow but I could not find a valid solution. I continued to experiment more to get to the bottom of my problem.

    Additionally, even before I run or do anything, when I start Qt, I get the following errors in general messages:
    9483721b-5f34-4ca8-9c3c-bdc6a1d26eea-image.png
    There are only 3 errors which seem to be repeated every couple of minutes. I have no idea what the some of the errors mean, but for the first one, I created a Android_NDK_ROOT environment variable, in the build settings for the project, Qt environment settings(tools->External->Configure->Environment->External Tools->Update Translations), and my Windows Environment variable settings and wrote "ANDROID_NDK_ROOT = ANDROID_NDK_ROOT=C:\Users\arjun\AppData\Local\Android\Sdk\ndk\21.3.6528147". However, even after all if this, my program still gave the same errors. Additionally, I could not figure out what the other two errors meant and choose to ignore them.

    After this, I completely deleted my Qt Creator, and all the things I downloaded along with Qt. I then downloaded Qt. It basically did not change anything, except when I run it, I get a completely different error.

    Here is the current state of errors and settings my Qt is in:

    My Kits:
    f884fb4e-a7e5-4866-b42e-5141cd6be58c-image.png
    My Qt versions:
    891774fb-8906-41db-a75b-4cfb9d0debe7-image.png
    My manually created android kit:
    cac0b263-8bda-47be-9de9-228943d18d5a-image.png
    Current compile output error:
    5491579b-06fe-4874-a144-ebe30ce4dbc8-image.png
    Current Android settings:
    ff468062-951e-4b20-95a3-06e41404746f-image.png
    Current general messages:
    f34715b5-dd52-4e51-9bb5-23f6a26b7d15-image.png
    These are some file errors I have been getting randomly on Qt, usually when I try to run something. For the most part, I have been ignoring them and but they might be relevant to my problem. These come back to back, usually more at a time:
    dcbc0a23-8049-4508-a09b-f7a60e23c58e-image.png
    5509ecb1-65d9-4637-97ea-6849ea4a00dd-image.png
    Issues I get when building:
    bb44bb43-b74d-4844-b2ed-9ba1f01f2577-image.png
    In conclusion, my Qt is being difficult and I cannot seem to figure out how to run Android. I have followed all your instructions on the video as well as a lot more but I still cannot figure it out. Can you please help me fix the problem so that I can run Qt Applications on virtual android devices?

    Thank You so much for your time and effort!


Log in to reply