'Android Studio on Windows, importing and/or adding existing C++ code to a project

I can't import existing C++ code into my Android project.

I'm using Android Studio, Arctic Fox, on Windows 10. A guy sent me his Android Studio project, which includes Kotlin and C++. I imported the project, which has C++ code in it, but for some reason the C++ code did not get included on import. It's in the Windows directory structure, but not visible in the project and the IDE can't find it.

I've provided two images of the project tree structure inside Android Studio. The one labeled #1 is how it should be. The one labeled #2 is how it is. Mine is in the state of #2.

Does anyone know how I can added these files to my project? I tried recreating a cpp folder, but could not find a way. I was going to then recreate the cpp/h file names and add the code by cut and paste from the original project. Although, it would be nice to just be able to import these files and folders.

The correction project configuration:

The correct project configuration

The wrong project configuration:

The incorrect project configuration

Thanks for any help!



Solution 1:[1]

I think you haven't install and configure the NDK for read code C++. if you want install and configure the NDK you can read this Install and configure the NDK

Hope can solve your problem :)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Fakhri Khairi