Closed jypeitao closed 9 months ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
@jypeitao which version of NDK had this file removed?
Change user and further confirm the problem.
C++ build system [configure] failed while executing: /usr/bin/cmake \ -H/home/peter/wk2/os/OpenXR-Tutorials/Chapter5 \ -DCMAKE_SYSTEM_NAME=Android \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DCMAKE_SYSTEM_VERSION=27 \ -DANDROID_PLATFORM=android-27 \ -DANDROID_ABI=x86 \ -DCMAKE_ANDROID_ARCH_ABI=x86 \ -DANDROID_NDK=/home/peter/Android/Sdk/ndk/23.1.7779620 \ -DCMAKE_ANDROID_NDK=/home/peter/Android/Sdk/ndk/23.1.7779620 \ -DCMAKE_TOOLCHAIN_FILE=/home/peter/Android/Sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake \ -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja \ -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/peter/wk2/os/OpenXR-Tutorials/Chapter5/app/build/intermediates/cxx/Debug/3v245142/obj/x86 \ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/home/peter/wk2/os/OpenXR-Tutorials/Chapter5/app/build/intermediates/cxx/Debug/3v245142/obj/x86 \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_FIND_ROOT_PATH=/home/peter/wk2/os/OpenXR-Tutorials/Chapter5/app/.cxx/Debug/3v245142/prefab/x86/prefab \ -B/home/peter/wk2/os/OpenXR-Tutorials/Chapter5/app/.cxx/Debug/3v245142/x86 \ -GNinja from /home/peter/wk2/os/OpenXR-Tutorials/Chapter5/app CMake Error at CMakeLists.txt:97 (include): include could not find requested file:
AndroidNdkModules
Found cmake in another path instead of Android sdk. Add cmake.dir=/home/peter/Android/Sdk/cmake/3.22.1 will be OK. But it needs to be added manually. I think even if it is cmake under another path, gradle can also add the cmake Modules path under android sdk.
Anyway, close this pr first.
I'm running into this issue as well. I'm not very familiar with gradle. My fix was to make CMake aware of it in the CMakeLists.txt
:
# native_app_glue
list(APPEND CMAKE_MODULE_PATH "$ENV{HOME}/Android/Sdk/cmake/3.22.1/share/cmake-3.22/Modules")
include(AndroidNdkModules)
android_ndk_import_module_native_app_glue()
AndroidNdkModules.cmake has been deleted by NDK