Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt6.1 android and subdirectory shared libs
Oleg Shalnev last edited by
Let me describe the situation I've found with android compilation and deploy.
As usual I have use sub directories for creating shared libs.
When you try to create CMakeLists.txt in project root dir and gui as sub dir and add gui dir by "add_subdirectory"
in core project file, the build will fail with "No target architecture defined in json file."
If you try to use gui application dir as a root project dir with lib subdir compilation of shared lib will fail.
QtCreator build normal deployment-settings.json for gui, but whron settings.json for subdir lib
As you can see there is no correct setting info is sub project.
The question is -> Have I possibilities to use complicated modules management with libraries and sub directories.
Platform: Linux Ubuntu 21.04, QtCreator 4.15, Qt 6.1
Thank's a lot for your attention and answers.
Ray Gray last edited by
I have a similar problem on Windows. Here is a workaround I use.
Consider this 'master' (top) CMakeLists.txt:
... then the build directory will contain:
build directory (android-MyGui-deployment-settings.json, ...) |_ MyLib |_ MyGui (android-MyGui-deployment-settings.json, ...) |_ ...
There are two android-MyGui-deployment-settings.json files there, one in the root and one in the MyGui folder.
Simple copy the one from MyGui and overwrite the one in the root - and you are ready to debug or run the app!