Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QT and Android Error in Androidextras
Qt 6.11 is out! See what's new in the release blog

QT and Android Error in Androidextras

Scheduled Pinned Locked Moved Installation and Deployment
7 Posts 2 Posters 9.1k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    RohitIti
    wrote on last edited by
    #1

    Hi,

    I am using QT in windows. version is Based on Qt 5.3.1 (MSVC 2010, 32 bit).
    whenever i add Qt+= androidextras i get the error saying

    Project ERROR: Unknown module(s) in QT: androidextras

    can some one tell me how to use this and bind the android and QT together ?

    1 Reply Last reply
    -1
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Android extras module is only available on Android. It will raise errors on other platforms. You can tell qmake to only include it on android like this:
      @
      android{
      QT += androidextras
      }
      @

      (Z(:^

      1 Reply Last reply
      1
      • R Offline
        R Offline
        RohitIti
        wrote on last edited by
        #3

        Thank you for the reply sierdzio. can you share one simple math calculation example including QT and android ? That will really help me in proceeding further.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          You mean something like this?
          @
          // .pro
          QT = core gui widgets

          SOURCES += main.cpp

          // main.cpp
          main (...) {
          QApplication app(argc, argv);

          QPushButton button;
          button.setText(QString::number(2 + 2));
          QObject::connect(&button, SIGNAL(clicked()), qApp, SLOT(quit()));
          button.show();

          return app.exec();
          }
          @

          Please be a bit more specific. I do not know what you need, and I don't see how your last post is connected to the original one.

          To compile and run an Android application, you need to download and install Qt for Android (Windows/Mac/Linux, depending on your host), install Android SDK and NDK (possible to do it from withing Qt Creator preferences), then use the Android Kit to compile and run your application. All this is covered in the documentation, I can point you to it, but I need to know exactly what you want.

          (Z(:^

          1 Reply Last reply
          0
          • R Offline
            R Offline
            RohitIti
            wrote on last edited by
            #5

            I have installed QT for android . what i want is a QT project(complete files) which does math calculation. the calculation is to be done in android code and the functions will be called from QT.

            This requires android project to be included in QT pro file and configured. Like we have notification example

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              I'm sorry, but if you need the job done for you, you should hire one of the Qt support companies.

              You already have an example to look on, and here are some additional links: "KDE article on JNI":https://community.kde.org/Necessitas/JNI, "Qt documentation":http://qt-project.org/doc/qt-5/qandroidjniobject.html.

              (Z(:^

              1 Reply Last reply
              0
              • R Offline
                R Offline
                RohitIti
                wrote on last edited by
                #7

                Thank you for the discussion sierdzio. i will try to get some more information on this.

                1 Reply Last reply
                0

                • Login

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