Skip to content

C/C++: CMake Error The source directory .. does not exist

Description

When building android-ndk with r25c, CMake gives a C/C++: CMake Error: The source directory "/home/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app/""" does not exist.

C/C++: CMake Error: The source directory "/home/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app/""" does not exist.
Execution failed for task ':app:configureCMakeDebug[armeabi-v7a]'.
C/C++: Specify --help for usage, or press the help button on the CMake GUI.
> [CXX1429] error when building with cmake using /home/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app/CMakeLists.txt: C++ build system [configure] failed while executing:

      /usr/local/lib/android/sdk/cmake/3.22.1/bin/cmake \
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
        -H/home/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app \

        -DCMAKE_SYSTEM_NAME=Android \
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
        -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \

        -DCMAKE_SYSTEM_VERSION=24 \
See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings
        -DANDROID_PLATFORM=android-24 \
27 actionable tasks: 12 executed, 15 up-to-date
        -DANDROID_ABI=armeabi-v7a \
        -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a \
        -DANDROID_NDK=/usr/local/lib/android/sdk/ndk/25.2.9519653 \
        -DCMAKE_ANDROID_NDK=/usr/local/lib/android/sdk/ndk/25.2.9519653 \
        -DCMAKE_TOOLCHAIN_FILE=/usr/local/lib/android/sdk/ndk/25.2.9519653/build/cmake/android.toolchain.cmake \
        -DCMAKE_MAKE_PROGRAM=/usr/local/lib/android/sdk/cmake/3.22.1/bin/ninja \
        "-DCMAKE_CXX_FLAGS=-std=c++17 -fexceptions -frtti -D_DEBUG=1" \
        -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app/build/intermediates/cxx/Debug/6x543a17/obj/armeabi-v7a \
        -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/home/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app/build/intermediates/cxx/Debug/6x543a17/obj/armeabi-v7a \
        -DCMAKE_BUILD_TYPE=Debug \
        -B/home/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app/.cxx/Debug/6x543a17/armeabi-v7a \
        -GNinja \
    from /home/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app
  CMake Error: The source directory "/home/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app/""" does not exist.
  Specify --help for usage, or press the help button on the CMake GUI.

CI: https://github.com/ShootingKing-AM/PhoneVR/actions/runs/4789821517/jobs/8518144941#step:9:266 CMakeFile: https://github.com/ShootingKing-AM/PhoneVR/blob/ab750209d9191f53842230848d09a362eedf50fa/code/mobile/android/PhoneVR/app/CMakeLists.txt

Succeeds in building locally but fails on CI.

Host OS

Linux

Host OS version

Ubuntu github-actions latest

Affected ABIs

armeabi-v7a, arm64-v8a, x86, x86_64

Build system

Gradle CMake

minSdkVersion

24

Edited by Harsha Raghu
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information