Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

Build using gradle is getting failed for generating apk



  • Hi all i am new to Qt.
    I am developing an android application using Qt/QML(C++). i have upgraded my Qt from open source 5.9.0(which uses “ant”) to QT5.15.1(which uses “Gradle”) for generating APK. I have downloaded most of the SDK, NDK packages directly from the Qt(Options--> manage kits -->Devices->Android->Set Up SDK/Download Open SSL) and whichever packages were not downloaded automatically those were downloaded from "Android Studio". Android settings are configured properly(All green). During building(while generating the apk) Qt is invoking gradle to generate API. But build is getting failed because gradle is not getting downloaded from provided websources internally. So i have manually downloaded the required gradle version from gradle’s official page: [https://gradle.org/next-steps/?version=5.6.4&format=all].

    I have included the gradle folder to my project from Projects-> Build Android APK -> Copy the Gradle files to Android directory and configure the path for the downloaded gradle.zip(Local path) folder in .properties file(gradle-wrapper.properties) instead of websources (for accessing gradle offline)and build the project. QT has now access to the gradle folder(located locally) but still have problems to access few of the https links(ex:https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.6.0/gradle-3.6.0.pom).

    For more clarity here is the screenshot of the error during building my project
    (check the attached file for the errorsNewQtIssue.png

    I have provided environmental variable also for proxy server:"_JAVA_OPTIONS". But that also did not resolved the issue.
    I have clarified with Qt team and this is not an issue with Qt tool. Somehow gradle is not able to connect to internet even after providing proxy server info.

    Please help me to resolve this issue. Thanks in advance.


Log in to reply