Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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



  • Hello,
    I have noticed this problem when I useAndroid 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 isOtherFiles/android folder.

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


Log in to reply