Skip to content

Mobile and Embedded

The forum for developing everything embedded: Linux, WinCE, Symbian, MeeGo... you name it.
14.1k Topics 62.3k Posts
  • Problem when using OpenSSL in the phone

    Unsolved 19 days ago
    0 Votes
    8 Posts
    285 Views
    @Ronel_qtmaster I recently had the same problem using Qt6.9: E/linker (21919): library "/system/lib/libcrypto.so" ("/system/lib/libcrypto.so") needed or dlopened by "/data/app/com.company.app--EodNGlgEtHINhQ6rIRNedQ==/lib/arm64/libQt6Core_arm64-v8a.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/com.company.app--EodNGlgEtHINhQ6rIRNedQ==/lib/arm64:/data/app/com.company.app--EodNGlgEtHINhQ6rIRNedQ==/base.apk!/lib/arm64-v8a", permitted_paths="/data:/mnt/expand:/data/data/com.company.app"] W/qt.tlsbackend.ossl(21919): Failed to load libssl/libcrypto. W/AudioCapabilities(21919): Unsupported mime audio/ac4 W/AudioCapabilities(21919): Unsupported mime audio/x-ima W/qt.network.ssl(21919): No functional TLS backend was found W/qt.network.ssl(21919): No TLS backend is available ... and stumbled across your posted Link: https://github.com/KDAB/android_openssl (I also think the same information are present in the official Qt doc: https://doc.qt.io/qt-6/android-openssl-support.html) However I either used the command add_android_openssl_libraries(${PROJECT_NAME}) wrong or did forget something because I get an error when running CMake that this is not a known command: CMake Error at CMakeLists.txt:279 (add_android_openssl_libraries): [cmake] Unknown CMake command "add_android_openssl_libraries". I also tried to add the extra libraries as mentioned set_target_properties(<target_name> PROPERTIES QT_ANDROID_EXTRA_LIBS "<path_to_libs_dir>/libcrypto_3.so" "<path_to_libs_dir>/libssl_3.so" ) like set_target_properties(${PROJECT_NAME} PROPERTIES QT_ANDROID_EXTRA_LIBS "${SSL_ROOT_PATH}/ssl_3/${CMAKE_ANDROID_ARCH_ABI}/libcrypto_3.so" "${SSL_ROOT_PATH}/ssl_3/${CMAKE_ANDROID_ARCH_ABI}/libssl_3.so" ) but this only led to CMake Error at CMakeLists.txt:274 (set_target_properties): [cmake] set_target_properties called with incorrect number of arguments. when trying to run it. However this post https://forum.qt.io/topic/160405/cmake-equivalent-for-qmake-s-android_extra_libs/3 made me aware that The values in QT_ANDROID_EXTRA_LIBS need to be separated by a semicolon. and also without a newline in between which finally made me come up with # Android for TLS backend include(${ANDROID_SDK_ROOT}/android_openssl/CMakeLists.txt) # this sets OPENSSL_ROOT_DIR and ANDROID_EXTRA_LIBS however I seem to need set *QT_*ANDROID_EXTRA_LIBS set_target_properties(${PROJECT_NAME} PROPERTIES QT_ANDROID_EXTRA_LIBS "${SSL_ROOT_PATH}/ssl_3/${CMAKE_ANDROID_ARCH_ABI}/libcrypto_3.so;${SSL_ROOT_PATH}/ssl_3/${CMAKE_ANDROID_ARCH_ABI}/libssl_3.so" ) or even just # Android for TLS backend set_target_properties(${PROJECT_NAME} PROPERTIES QT_ANDROID_EXTRA_LIBS "${ANDROID_SDK_ROOT}/android_openssl/ssl_3/${CMAKE_ANDROID_ARCH_ABI}/libcrypto_3.so;${ANDROID_SDK_ROOT}/android_openssl/ssl_3/${CMAKE_ANDROID_ARCH_ABI}/libssl_3.so" ) Is this a bug in Qt/QtCreator or just an error in the documentation? Where could I report this?
  • Qt6 CMake install java files

    Unsolved a day ago
    0 Votes
    2 Posts
    46 Views
    I managed to come up with a workaround (which I would like to have only temporary xD) Instead of trying to compile my additional subproject .java files directly to the build folder, I can move it to QT_ANDROID_PACKAGE_SOURCE_DIR directory -> where they then get copied to the build folder autmatically. This essentially works but I do not want those files to be present in my root project dir so I added those to my .gitignore tried to add a custom command after build to delete those files: For each folder I add a variable appends the given path and in my root project's CMake I have if (ANDROID) # Collect all registered plugin folders and clean after build after linking subdirectories get_property(ALL_JAVA_PLUGIN_DIRS GLOBAL PROPERTY JAVA_CLEANUP_DIRS) message(STATUS "ALL_JAVA_PLUGIN_DIRS: ${ALL_JAVA_PLUGIN_DIRS}") foreach(DIR_TO_DELETE ${ALL_JAVA_PLUGIN_DIRS}) message(STATUS "Adding custom command for deleting: ${DIR_TO_DELETE}") add_custom_command( TARGET ${ROOT_PROJECT} POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo "Deleting: ${DIR_TO_DELETE}" COMMAND ${CMAKE_COMMAND} -E remove_directory ${DIR_TO_DELETE} COMMENT "Cleaning up plugin java folder after build: ${DIR_TO_DELETE}" ) endforeach() endif () Sadly this does not really work reliable :/ Every time after a successful build (when I think this should be triggered) I see neither the echo command, nor the comment anywhere in the logs and the files still remain, but on the other hand, sometimes in between it seems that the files get purged thus making my build fail xD Is anyone aware of another approach / solution to this? Am I the only one having this problem, maybe I have something wonky with my project setup? :-s Essentially I am just searching for successor of "INSTALLS" for QMake which I can apply to CMake
  • Android Emulator broken

    Unsolved 5 Mar 2025, 13:23
    0 Votes
    4 Posts
    115 Views
    Hello Michel, just solved the issue for Qt6.9 on Ubuntu 24.04 by adding to AndroidEmulator startup args (AVD Arguments button): -gpu host. Source: https://developer.android.com/studio/run/emulator-acceleration#accel-graphics
  • How to automatically launch iOS app with parameters

    Locked Solved 17 May 2021, 16:52
    0 Votes
    9 Posts
    2k Views
    Note that for Android 12 and later, you need some extra steps for URLs like https://example.org/register to be picked up by your app and not a web browser. See https://developer.android.com/training/app-links. You now need to host an assetlinks JSON file under /.well-known/assetlinks.json and point your AndroidManifest.xml at this. See https://developer.android.com/training/app-links/verify-android-applinks. You can host the assetlinks on GitHub pages if you don't have your own server. In our case, iOS doesn't care about the change of domain because we only look at the query parameters in the URL.
  • QML TextEdit, validator, regex with \pL — how to do it?

    Unsolved 6 days ago
    0 Votes
    6 Posts
    175 Views
    @zvoopz Right, that's what I do in my non-QML widget code. For my QML code, exposing a C++ object class may be the best solution, if only because QRegularExpressionValidator can do an intelligent "fixup" that would let me accept a paste while filtering out any invalid characters, but it's odd to me that [a] TextEdit still doesn't have a validator property, and [b] QML is still stuck on ECMA 7th edition, which is now nine years old.
  • This topic is deleted!

    Unsolved 6 days ago
    0 Votes
    1 Posts
    17 Views
    No one has replied
  • install Qt for android

    Unsolved 7 days ago
    0 Votes
    14 Posts
    349 Views
    [image: bd77a633-65c6-44df-b91f-4ae101671b0e.png]
  • 0 Votes
    2 Posts
    527 Views
    Newer versions of Android are able to read native libs directly from the apk without extracting them if they are stored uncompressed in the apk. This is done to save disk space on the device, and the new default during apk creation, but Qt 5.12 does not handle this. To compress native libs again add android:extractNativeLibs="true" in AndroidManifest.xml to the application tag.
  • Button over QVideoWidget

    Solved 27 Apr 2024, 08:38
    0 Votes
    24 Posts
    2k Views
    One Solution Without QML I've figured a way to get the QVideoWidget to stack behind QPushButton and QLabel in a Widgets application without using QML - the camera has to be started before the stacking order is set. Otherwise, the QVideoWidget gets forced to the front no matter what you do. This worked for me.
  • 0 Votes
    1 Posts
    45 Views
    No one has replied
  • qt.bluetooth.windows: Could not await descriptor read result

    Unsolved 12 days ago
    0 Votes
    1 Posts
    38 Views
    No one has replied
  • Qt6.8 for Android,Unable to create the template

    Unsolved 15 Apr 2025, 07:04
    0 Votes
    10 Posts
    429 Views
    When creating a project, selecting "Qt Quick Application (compat)" to generate a .pro-based project allows normal template creation under the "Build Android APK" option. However, choosing "Qt Quick Application" with CMake (generating CMakeLists.txt) causes the issue. This suggests the problem relates to legacy .pro (qmake) vs modern CMake build systems in Qt Android packaging.
  • Yocto and patches. How are they applied? Can I patch a patch?

    Unsolved 13 days ago
    0 Votes
    1 Posts
    73 Views
    No one has replied
  • 1 Votes
    2 Posts
    108 Views
    Found out this is a known bug: https://bugreports.qt.io/browse/QTBUG-136493
  • 0 Votes
    2 Posts
    97 Views
    I actually found a solution to my problem :DDD In fact this was a bug in Qt since 6.7.3: https://bugreports.qt.io/browse/QTBUG-135978?gerritReviewStatus=Open which now seems to be fixed https://codereview.qt-project.org/c/qt/qtbase/+/643588 A workaround for now suggest here https://bugreports.qt.io/browse/QTBUG-132412 is to Configure with cmake 3.29+ and the extra -DQT_FORCE_CMP0156_TO_NEW=ON option. which I did by setting the policy in my root project cmake file right before find_package: # Enable CMP0156 explicitly to prevent duplicate symbol errors when using -ObjC linker flag if (POLICY CMP0156) message(STATUS "Setting CMP0156 policy to NEW...") set(QT_FORCE_CMP0156_TO_NEW ON CACHE BOOL "Force CMake policy CMP0156 to NEW behavior for Qt6") elseif () message(ERROR "CMP0156 policy not available! Please switch to cmake 3.29+ and Qt6.9") endif ()
  • Android app icon does not fit the icon frame on Android device

    Unsolved 20 days ago
    0 Votes
    3 Posts
    143 Views
    Usually this happens when the Icon itself has white space. Usually people try to accommodate round corners to match the other Icons on the phone. But the round corners come from the OS itself, so the Icon has to be "fullscreen"
  • 3 Votes
    1 Posts
    91 Views
    No one has replied
  • Android App via debugger cashes updateNativeActivity() not found

    Unsolved 28 days ago
    0 Votes
    6 Posts
    500 Views
    Can you try to use 6.8 instead of 6.9.0 ?
  • Andrioid Emulator no Widget GUI updates

    Unsolved 23 days ago
    0 Votes
    4 Posts
    169 Views
    I found a global solution for it (resp. ChatGPT :-) and will share it here. class AndroidApplication : public QApplication { public: AndroidApplication(int &argc, char **argv) : QApplication(argc, argv) {} bool notify(QObject *receiver, QEvent *e) override { // Erstmal normal weiterleiten bool ok = QApplication::notify(receiver, e); // Bei jedem UpdateRequest-Event erzwingen wir einen Frame-Swap if (e->type() == QEvent::UpdateRequest) { // Prüfen, ob das Ziel ein QWidget ist if (auto w = qobject_cast<QWidget*>(receiver)) { if (auto wh = w->window()->windowHandle()) { wh->requestUpdate(); // sofortigen Flush anstoßen } } } return ok; } }; It works ! Is this ok in general and for performance issues ?
  • 0 Votes
    2 Posts
    195 Views
    I found a solution for me hw.gpu.enabled = yes hw.gpu.mode = angle ... what ever it means