Skip to content
  • 0 Votes
    2 Posts
    274 Views
    A

    A hack that I had to do for this to work is to manually copy the so file.

    if(ANDROID) add_custom_command(TARGET cook-ui-modular-qt POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/App/ConnectedSocket/libConnectedSocket_${ANDROID_ABI}.so ${CMAKE_BINARY_DIR}/App/UserInterface/android-build/libs/${ANDROID_ABI}/libConnectedSocket_${ANDROID_ABI}.so ) endif()

    This is obviously not the right way to do it. But I don't know how to do it the right way

  • 0 Votes
    2 Posts
    1k Views
    JakeJ

    This appears to be a QT Android deployment issue.
    It also looks like some sample apps are hard coded to particular Qt release?

    The following is what I did to fix sound for the Maroon sample app (a QtQuick/QML app) on Qt 5.6 for Android x86.

    The fix for: "Maroon In Trouble".
    Modified the resource: SoundEffect.qml:
    Added (missing!?):
    import QtMultimedia 5.6

    Modified the following line, changing the library from 5.0 to 5.6:
    property QtObject effect: Qt.createQmlObject("import QtMultimedia 5.6; SoundEffect{ source: '" + container.source + "'; muted: !Qt.application.active }", container);

    Applying the above changes added one additional library to the Android plugin/lib directory
    ...android-build\libs\x86\*.so -> libqml_QtMultimedia_libdeclarative_multimedia.so

    Note: libplugins_audio_libqtaudio_opensles.so was present in: ...android-build\libs\x86\ before I added the import statement, but this library may not have been actually deployed? (hence the log message "QtMultimedia" is not installed)

    Note: It appears that 5 additional dependencies from Qt are reported to be added to the package.

    It appears that it is not enough to have an entry in the *.pro for qtHaveModule(multimedia): QT += multimedia as the Qt sound libraries are not deployed? I think adding the import statement probably changed what was actually deployed, but someone better informed about apk's & how deployment works can probably explain this better.

    Now I need to understand how to do the equivalent deployment fix for my C++ app. Does anyone know the equivalent to the above "import" statement?, to ensure that ALL the multimedia files libraries/plugins are deployed? As I think I am running into the very same issue. Where does one put the import statement in a C++ app?

    Thanks in advance!
    Jake