QT and Android Error in Androidextras



  • 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 ?


  • Moderators

    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
    }
    @



  • 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.


  • Moderators

    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.



  • 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


  • Moderators

    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.



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.