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. Why android template project is not displayed in the project structure in QtCreator?
QtWS25 Last Chance

Why android template project is not displayed in the project structure in QtCreator?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 493 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.
  • advmA Offline
    advmA Offline
    advm
    wrote on last edited by advm
    #1

    Hello,
    I have noticed this problem when I use Android kit(no matter which one) with CMake as build system.
    I create android template project from the Project view of QtCreator:

    b4Yof.png

    The android folder is created but I got this error:

    V1QjA.png

    And the android project is not displayed in the project structure in QtCreator. I tried also uncommenting this line in CMakeLists.txt:

    set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
    

    I also tried with adding DISTFILES variable same like in the .pro file when qmake is used:

    set(DISTFILES
        android/AndroidManifest.xml
        android/build.gradle
        android/gradle.properties
        android/gradle/wrapper/gradle-wrapper.jar
        android/gradle/wrapper/gradle-wrapper.properties
        android/gradlew
        android/gradlew.bat
        android/res/values/libs.xml
    )
    

    but it is not working. This is not happening when I use qmake. In that case, project structure is updated and there is OtherFiles/android folder.

    How can I solve this with cmake? Thanks in advance.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      RoachLin
      wrote on last edited by
      #2

      see this
      https://stackoverflow.com/questions/65831676/qt-android-cmake-custom-androidmanifest-xml-not-taken-into-account

      for me, the first answer does not take effect, but the second answer works well.

      1 Reply Last reply
      0

      • Login

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