Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. AndroidManifest after build do not match the android Manifest I have in the source directory
Forum Updated to NodeBB v4.3 + New Features

AndroidManifest after build do not match the android Manifest I have in the source directory

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 700 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TiagoSD
    wrote on last edited by
    #1

    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}
    )
    
    J.HilkJ 1 Reply Last reply
    0
    • T TiagoSD

      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}
      )
      
      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @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.html

      set_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


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      T 1 Reply Last reply
      2
      • J.HilkJ J.Hilk

        @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.html

        set_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

        T Offline
        T Offline
        TiagoSD
        wrote on last edited by
        #3

        @J-Hilk Thank you! I somehow missed that instruction.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved