Important: Please read the Qt Code of Conduct -

problem in generating .so files using msys2 tool for qt on android

  • I am trying to port my qt project on Android. I am using qt5.14.1 and NDK r21 with SDK API level 26. In the project, I used Openssl libraries for internet connectivity. Now I am trying to generate OpenSSL libs(i.e., using msys2 tool. I refer to generate the libraries.


    its getting error that the GCC compiler for android not found. Please tell me how can I set the path for the android GCC compiler and generate OpenSSL libraries or is there any other method to generate these libraries.

    I also tried with and libraries but its getting errors due to some compatibility issues.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Please take a look at KDAB's Androïd OpenSSL project. It should simplify things.

  • thanks for reply. I tried those libraries. get request is working fine in it but the post request is not working.

    QUrl targateUrl = m_apiUrlHelper->getLoginURL()+"?clientName="+ m_apiUrlHelper->getServerClientName();
        qDebug() << targateUrl;
        QVariantMap feed;
        QByteArray payload=QJsonDocument::fromVariant(feed).toJson();
        qDebug() << payload;
        //send request to url
        QNetworkRequest request;
        QNetworkAccessManager *restclient; //in class
        restclient = new QNetworkAccessManager(); //constructor
        connect(&m_loginprocessor, SIGNAL(dataReady(QString)), this, SLOT(handleGetUserResponse(QString)));
        connect(restclient, SIGNAL(finished(QNetworkReply*)), &m_loginprocessor, SLOT(handleAPIResponse(QNetworkReply*)));

    I tried this for post request. This code is working fine on windows platform but for android platform it doesn't give any responce. I didn't understand is there any issue with libraries or code. any sugestions on it.

  • Lifetime Qt Champion

    Did you deploy the OpenSSL libraries along your application on Android ?

  • yes I did. the get request is working in it.

Log in to reply