Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.3.1, 6.4.0 RC1
-
None
-
41a8e6fce (6.4), 6294ee060 (dev)
Description
First apply the patch QTBUG-105841
Then configure the project with cmake 3.18
/usr/lib/qt-android-6.3-arm64-v8a/bin/qt-cmake -S ./qtbase/examples/corelib/platform/androidnotifier -B bb -DANDROID_SDK_ROOT=~/Android/Sdk -DANDROID_NDK_ROOT=~/Android/Sdk/ndk/android-ndk-r23c
At the end there is this error:
CMake Error at /usr/lib/qt-android-6.3-arm64-v8a/lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:301 (file): Error evaluating generator expression: $<TARGET_PROPERTY:_qt_internal_apk_dependencies,_qt_android_extra_library_dirs> Target "_qt_internal_apk_dependencies" not found. Call Stack (most recent call first): /usr/lib/qt-android-6.3-arm64-v8a/lib/cmake/Qt6Core/Qt6AndroidMacros.cmake:1085 (qt6_android_generate_deployment_settings) /usr/lib/qt-android-6.3-arm64-v8a/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:641 (_qt_internal_android_executable_finalizer) /usr/lib/qt-android-6.3-arm64-v8a/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:641 (cmake_language) /usr/lib/qt-android-6.3-arm64-v8a/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:705 (_qt_internal_finalize_executable) /usr/lib/qt-android-6.3-arm64-v8a/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:1177 (qt6_finalize_target) CMakeLists.txt:32 (qt_finalize_executable)
It is likely all android examples are impacted:
./qtsensors/examples/sensors/accelbubble/android/AndroidManifest.xml
./qtsensors/examples/sensors/sensorsshowcase/android/AndroidManifest.xml
./qtsensors/examples/sensors/maze/android/AndroidManifest.xml
./qtspeech/src/plugins/tts/android/jar/AndroidManifest.xml
./qtmultimedia/examples/multimediawidgets/camera/android/AndroidManifest.xml
./qtmultimedia/src/android/jar/AndroidManifest.xml
./qtbase/examples/corelib/platform/androidnotifier/android/AndroidManifest.xml
./qtpositioning/src/plugins/position/android/jar/AndroidManifest.xml
./qt3d/examples/qt3d/planets-qml/android/AndroidManifest.xml
./qtconnectivity/examples/nfc/ndefeditor/android/AndroidManifest.xml
./qtconnectivity/examples/nfc/annotatedurl/android/AndroidManifest.xml
./qtconnectivity/src/android/bluetooth/AndroidManifest.xml
./qtconnectivity/src/android/nfc/AndroidManifest.xml
BTW, if the android examples are supposed to be buildable with cmake < 3.19, you may want to apply this:
Users that use cmake version less that 3.19 need to call qt_finalize_project # in the end of a project's top-level CMakeLists.txt.