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. How to avoid my AndroidManifest.xml to be overwritten.
Forum Update on Monday, May 27th 2025

How to avoid my AndroidManifest.xml to be overwritten.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 3 Posters 1.0k 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.
  • carles.sole.grauC Offline
    carles.sole.grauC Offline
    carles.sole.grau
    wrote on last edited by carles.sole.grau
    #1

    Hi everyone,
    For some features, as locking the screen rotation, it's necessary to change the AndroidManifest.xml.
    The problem is that if I modify it, once I compile my project again to load it to an Android Device, the AndroidManifest.xml device is overwritten.
    Has anyone know how to solve this problem?

    Thanks.

    1 Reply Last reply
    0
    • kd_walaK Offline
      kd_walaK Offline
      kd_wala
      wrote on last edited by
      #2

      Hi,
      You can put a config for Android in file .pro
      ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
      "android-sources" is folder contain AndroidManifest.xml

      For more detail, you can refer to : http://doc.qt.io/qt-5/deployment-android.html

      1 Reply Last reply
      3
      • C Offline
        C Offline
        Carmoneer
        wrote on last edited by
        #3

        Within Qt Creator

        • On the 'Mode Selector' pane select 'Projects'.
        • Under 'Build & Run', expand 'Build Android APK' by selecting details.
        • Under 'Android', click the 'Create Template' button.

        That will add an Android folder within your project folder with an AndroidManifest.xml file that you can edit and it will not be overwritten with each build.

        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