Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. problem in generating .so files using msys2 tool for qt on android

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

Scheduled Pinned Locked Moved Solved Mobile and Embedded
androidopenssl
5 Posts 2 Posters 604 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HemantSuryawanshi
    wrote on 5 Jul 2020, 06:59 last edited by HemantSuryawanshi 7 May 2020, 07:05
    #1

    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. libcrypto_1_1.so, libssl_1_1.so) using msys2 tool. I refer https://doc.qt.io/qt-5/android-openssl-support.html to generate the libraries.

    263b3994-0464-4334-b8c8-c3f34282f4de-image.png

    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 libcrypto.so and libssl.so libraries but its getting errors due to some compatibility issues.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 5 Jul 2020, 18:44 last edited by
      #2

      Hi and welcome to devnet,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • H Offline
        H Offline
        HemantSuryawanshi
        wrote on 7 Jul 2020, 14:45 last edited by HemantSuryawanshi 7 Jul 2020, 14:54
        #3

        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;
            feed.insert("username",userName);
            feed.insert("password",password);
        
            QByteArray payload=QJsonDocument::fromVariant(feed).toJson();
            qDebug() << payload;
        
            //send request to url
            QNetworkRequest request;
            request.setUrl(targateUrl);
            request.setHeader(QNetworkRequest::ContentTypeHeader,"application/json");
        
            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*)));
            restclient->setStrictTransportSecurityEnabled(true);
            restclient->post(request,payload);
        

        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.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 7 Jul 2020, 19:39 last edited by
          #4

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

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • H Offline
            H Offline
            HemantSuryawanshi
            wrote on 8 Jul 2020, 05:06 last edited by
            #5

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

            1 Reply Last reply
            0

            1/5

            5 Jul 2020, 06:59

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved