Show additional C / C ++ header files in Android Studio

I have a big project written in C ++ that I am trying to create now for Android using Android Studio. The project contains quite a few libraries, each of which has its own code, but the source code files include headers that are shared by some or all of the libraries and located in directories other than those that contain the source files. This means that in the file CMakeLists.txtI indicated them all with include_directories. Now I see that when using this CMake script in Android Studio, the only files visible in the project browser are the files .cppcompiled by purpose and files.hthat have the same name as their corresponding source. I want to be able to quickly edit all project files, not just those that were found in Android Studio, and therefore it would be useful to have all the common headers listed in the project browser. How to specify additional files / directories to be displayed?

I already tried to do this by saying in a .gradlescript

sourceSets {
    main {
        java {
            srcDirs "../whatever/"
        }
    }
}

But this is clearly not ideal, because these directories are displayed in a folder javain the browser, and any error found in these header files cannot go to the problem line.

+4
source share

Source: https://habr.com/ru/post/1671596/


All Articles