AndroidManifest after build do not match the android Manifest I have in the source directory
-
Hello. I am struggling with a build problem . I have an AndroidManifest.xml in the android directory in my source directory. I am using cmake with the cmake file as of bellow. When I build the project, for any of the targets, the build create an Android-build directory inside the build dir of each target, but with content completely unrelated to the source. The final result is, I am unable to update the version of my app. I am for several days trying to discover from where he takes that Manifest.xml.
Probably I am missing something simple or I misunderstood some mechanic. Can anyone orient me on what I should expect and what Manifest I should update so I can package my Application correctly using QtCreator?
cmake_minimum_required(VERSION 3.16) project(aquila_companion VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 6.4 REQUIRED COMPONENTS QuickControls2 Quick LinguistTools) qt_standard_project_setup() set(CMAKE_AUTORCC ON) set(QT_ANDROID_BUILD_ALL_ABIS ON) qt_add_executable(appaquila_companion main.cpp aquila_backend.h httprequestworker.h httprequestworker.cpp aquila_backend.cpp restworker.h restworker.cpp #lang/appaquila_companion_en.ts #lang/appaquila_companion_pt_BR.ts translations.qrc images.qrc ) qt_add_qml_module(appaquila_companion URI aquila_companion VERSION 1.0 QML_FILES Main.qml components/Evaluationitem.qml components/Worklistitem.qml components/Starlike.qml components/Ratingstar.qml RESOURCES resources/plus.png resources/bullet.png resources/performance.png resources/user-solid-2.png resources/hashtag-solid.png resources/calendar-regular.png resources/star.png resources/aquila_dark_back.png resources/aquila_light_back.png resources/aquila_mono_main.png resources/aquila_brand_mono_white.png Montserrat-Regular.ttf components/Worklistitem.qml components/Horizontalgauge.qml images.qrc translations.qrc resources/appaquila_companion_en.qm resources/appaquila_companion_pt_BR.qm #lang/appaquila_companion_en.ts lang/appaquila_companion_pt_BR.ts ) qt_add_translations(appaquila_companion TS_FILES lang/appaquila_companion_en.ts lang/appaquila_companion_pt_BR.ts QM_FILES_OUTPUT_VARIABLE qm_files ) #qt_add_lupdate(appaquila_companion TS_FILES land/qml_en.ts) set_target_properties(appaquila_companion PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) target_link_libraries(appaquila_companion PRIVATE Qt6::Quick ) install(TARGETS appaquila_companion BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
-
Hello. I am struggling with a build problem . I have an AndroidManifest.xml in the android directory in my source directory. I am using cmake with the cmake file as of bellow. When I build the project, for any of the targets, the build create an Android-build directory inside the build dir of each target, but with content completely unrelated to the source. The final result is, I am unable to update the version of my app. I am for several days trying to discover from where he takes that Manifest.xml.
Probably I am missing something simple or I misunderstood some mechanic. Can anyone orient me on what I should expect and what Manifest I should update so I can package my Application correctly using QtCreator?
cmake_minimum_required(VERSION 3.16) project(aquila_companion VERSION 0.1 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Qt6 6.4 REQUIRED COMPONENTS QuickControls2 Quick LinguistTools) qt_standard_project_setup() set(CMAKE_AUTORCC ON) set(QT_ANDROID_BUILD_ALL_ABIS ON) qt_add_executable(appaquila_companion main.cpp aquila_backend.h httprequestworker.h httprequestworker.cpp aquila_backend.cpp restworker.h restworker.cpp #lang/appaquila_companion_en.ts #lang/appaquila_companion_pt_BR.ts translations.qrc images.qrc ) qt_add_qml_module(appaquila_companion URI aquila_companion VERSION 1.0 QML_FILES Main.qml components/Evaluationitem.qml components/Worklistitem.qml components/Starlike.qml components/Ratingstar.qml RESOURCES resources/plus.png resources/bullet.png resources/performance.png resources/user-solid-2.png resources/hashtag-solid.png resources/calendar-regular.png resources/star.png resources/aquila_dark_back.png resources/aquila_light_back.png resources/aquila_mono_main.png resources/aquila_brand_mono_white.png Montserrat-Regular.ttf components/Worklistitem.qml components/Horizontalgauge.qml images.qrc translations.qrc resources/appaquila_companion_en.qm resources/appaquila_companion_pt_BR.qm #lang/appaquila_companion_en.ts lang/appaquila_companion_pt_BR.ts ) qt_add_translations(appaquila_companion TS_FILES lang/appaquila_companion_en.ts lang/appaquila_companion_pt_BR.ts QM_FILES_OUTPUT_VARIABLE qm_files ) #qt_add_lupdate(appaquila_companion TS_FILES land/qml_en.ts) set_target_properties(appaquila_companion PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE TRUE WIN32_EXECUTABLE TRUE ) target_link_libraries(appaquila_companion PRIVATE Qt6::Quick ) install(TARGETS appaquila_companion BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
@TiagoSD what qt version are you suing ?
Qt6 ? than use this:
https://doc.qt.io/qt-6/cmake-target-property-qt-android-package-source-dir.htmlset_property(TARGET myapp APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android)
assuming your manifest file is in the
android
sub folder -
@TiagoSD what qt version are you suing ?
Qt6 ? than use this:
https://doc.qt.io/qt-6/cmake-target-property-qt-android-package-source-dir.htmlset_property(TARGET myapp APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android)
assuming your manifest file is in the
android
sub folder