Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7.0
-
None
-
-
2024wk4Xs3FOQtforAndroid
Description
We provide an SDK as AAR from our application. So this AAR shouldn't provide any GUI-related libraries. But libplugins_platforms_qtforandroid requires Qt6Gui with a lot of imageformats and iconengines with Qt6Svg.
So we tried to add custom property "deployment-dependencies".
"deployment-dependencies": "lib/libQt6Core_armeabi-v7a.so,lib/libQt6Network_armeabi-v7a.so,lib/libQt6Concurrent_armeabi-v7a.so,lib/libQt6StateMachine_armeabi-v7a.so,lib/libQt6Gui_armeabi-v7a.so,lib/libQt6WebSockets_armeabi-v7a.so,lib/libQt6Nfc_armeabi-v7a.so,lib/libcrypto_armeabi-v7a.so,lib/libssl_armeabi-v7a.so,plugins/networkinformation/libplugins_networkinformation_qandroidnetworkinformation_armeabi-v7a.so,plugins/tls/libplugins_tls_qopensslbackend_armeabi-v7a.so,plugins/platforms/libplugins_platforms_qtforandroid_armeabi-v7a.so,jar/Qt6Android.jar,jar/Qt6AndroidNetwork.jar,jar/Qt6AndroidNetworkInformationBackend.jar,jar/Qt6AndroidNfc.jar",
It will add all .so and .jars but it misses to add the required "static_init_classes" for QtNfc in "res/values/libs.xml":
<string name="static_init_classes"></string> Should be: <string name="static_init_classes">org.qtproject.qt.android.nfc.QtNfc</string>
Qt6Nfc_armeabi-v7a-android-dependencies.xml
<rules><dependencies> <lib name="Qt6Nfc_armeabi-v7a"><depends> <jar bundling="1" file="jar/Qt6AndroidNfc.jar" initClass="org.qtproject.qt.android.nfc.QtNfc" /> <permission name="android.permission.NFC" /> </depends></lib> </dependencies></rules>%
It seems it is impossible to set static_init_classes by itself as it is not possible to add the whole xml file.
"deployment-dependencies": "...,lib/Qt6Nfc_armeabi-v7a-android-dependencies.xml,",
Maybe it would be better to add an "exclude" entry for androideployqt to use automatic collection but avoid some libraries/plugins? That would be easier.
Attachments
Issue Links
- relates to
-
QTBUG-124912 Split libplugins_platforms_qtforandroid without QGui
- Reported
-
QTBUG-124499 Console application template should use lightweight AndroidManifest.xml without <activity>
- Reported