Unsolved Upgraded to Qt 6 and Android Extras is gone
-
I just upgraded to Qt 6 for better Qt Quick 3D support and noticed that Android Extras (which I'm dependent on for simplified JNI interop) isn't included. Searching around I found this:
Code from these Qt <platform> Extras modules will find new homes in more relevant modules over time, and any remaining APIs considered for inclusion in later 6.x releases (https://wiki.qt.io/New_Features_in_Qt_6.0)
Is there any way to get Android Extras back without waiting for an future Qt 6 release? Or, is there an alternative that I'm not seeing built into Qt 6 already?
-
Hi,
One possibility you can try is to build the module by hand with your Qt 6 installation.
-
I am having the same problem. (Android project that worked in Qt 5.15.2 is now failing in Qt 6.0.0 due to missing androidextras).
@SGaist, do you have any tips for how one would go about building the module by hand and then incorporating into an existing project in Qt 6.0.0?
-
Clone the module and use the usual qmake/make/make install trifecta.
Note that I have not tested that. It's just a suggestion.
-
Is there any recommendation or a way to run native code like when using QAndroidJniObject in QT 6? To be honest i am quite confused now. What is the official advice to do when porting apps to QT 6 using such modules? I'd expect some kind of replacement.
By the way, do I understand correctly your suggestion, doing this? I have tried:git clone git://code.qt.io/qt/qtandroidextras.git /.../Qt/6.1.0/gcc_64/bin/qmake qtandroidextras make
and got this:
make[1]: Entering directory '/.../src' make[1]: Nothing to be done for 'first'. make[1]: Leaving directory '/.../src'
-
@Hitokage said in Upgraded to Qt 6 and Android Extras is gone:
Is there any recommendation or a way to run native code like when using QAndroidJniObject in QT 6?
According to Qt Wiki (https://wiki.qt.io/New_Features_in_Qt_6.0), Qt Android Extra will no more be available:
Code from these Qt <platform> Extras modules will find new homes in more relevant modules over time, and any remaining APIs considered for inclusion in later 6.x releases:
- Qt Android Extras
- Qt Mac Extras
- Qt X11 Extras
- Qt Windows Extras
-
@KroMignon said in Upgraded to Qt 6 and Android Extras is gone:
Qt Android Extra will no more be available:
It sounds rather like it will be part of a later Qt6 release.
-
@jsulm said in Upgraded to Qt 6 and Android Extras is gone:
It sounds rather like it will be part of a later Qt6 release.
For me, I sounds like it will be merged/moved somewhere else, and maybe with API changes.
Which means, for me, QtAndroidExtras will disappear. -
@jsulm Qt 6.1 first Alpha is now available, and in the not yet complete changes overview (https://wiki.qt.io/New_Features_in_Qt_6.1), you can find this
QtCore
Added QJniObject and QJniEnvironment as public API (mainly used for Android).So it seems that QtAndroidExtras will be merge into QtCore :)
-
you should also follow discussion here:
https://bugreports.qt.io/browse/QTBUG-89482
https://bugreports.qt.io/browse/QTBUG-84382 (together with some referenced bugreports there)I'm waiting for Qt 6.2 to be able to transform my mobile apps for Qt 6
-
Thank you @ekkescorner and @KroMignon
Seems like 6.2 will be the solution for many related problems.