Unknown module in the .pro file - it is impossible to create an application with the androidextras module enabled

I am working on some Qt / QML application that will be deployed to Android OS. Now I need a module androidextras, but if I put androidextrasinside my file .proas follows

QT += qml quick widgets sql core bluetooth printsupport androidextras

and I rebooted qmake, I get the following error:

Project ERROR: Unknown module in QT: androidextras

I also tried to open and run the Qt Notifier sample project , but the same error occurs, so I can neither create my application, nor an example that should have worked out of the box.

I use KUbuntu 15.04with compiler gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)and Desktop Qt 5.5.0 GCC 64bitQt. How to create this module androidextras? I have a set Android arm v7that you can see from the screenshot of the Maintenance Tool:

enter image description here

I recompiled all Qt with clear && ./configure -opensource -confirm-license -verbose -cups -plugin-sql-mysql -android-sdk /opt/android-sdk-linux -android-ndk /opt/android-ndk-r10d && make && make install, configured Qt and Qt Kit in QtCreator, changed the build set and the same error appears. Why?

+4
source share
1 answer

Extras , , , , . iOS, Windows (, QPixmap CGImageRef, Mac).

- Win, Mac/iOS, X11, Android - , . , : - .

() - () . ( ) .

, / , , , . , , . .pro :

android: QT += androidextras
mac: QT += macextras
// ...other platform specific and platform independent  settings

. android .pro, .

, .. . , :

if defined(Q_OS_ANDROID)
#include <QtAndroid>
#include <QAndroidJniObject>
#endif

// other code...

void YourClass::function()
{
#if defined(Q_OS_ANDROID)
// platform code
#elif defined(Q_OS_WIN)

#endif
}        

. Android iOS .

+4

Source: https://habr.com/ru/post/1608961/


All Articles