2

I am getting below error, When I try to clean my Android NDK project

12:41:28: Executing task 'clean'...

Executing tasks: [clean]

Task :app:externalNativeBuildCleanDebug FAILED Clean NextGenJNIWrapperExample armeabi-v7a ninja: error: loading 'build.ninja': The system cannot find the file specified.

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:externalNativeBuildCleanDebug'. Build command failed. Error while executing process D:\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {--build D:\ssl\NGC\NextGenConsole\app.externalNativeBuild\cmake\debug\armeabi-v7a --target clean}

    ninja: error: loading 'build.ninja': The system cannot find the file specified.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 0s 1 actionable task: 1 executed 12:41:29: Task execution finished 'clean'.

shizhen
  • 12,251
  • 9
  • 52
  • 88
  • check https://stackoverflow.com/a/54473346/8034839 if it helps – shizhen Feb 27 '19 at 08:34
  • 1
    is this 3.3.1? if not, try with 3.3.1, not 3.3.0. relink the C++ project with "Build" > "Refresh linked C++ Project". Also check for ...\.externalNativeBuild\cmake\debug\armeabi-v7a\cmake_build_command.txt, cmake_build_output.txt. also android_gradle_build.json. – Gerry Feb 28 '19 at 19:52

1 Answers1

1

I had same issue and i fixed it

 externalNativeBuild {
       cmake {
           path "src/main/cpp/CMakeLists.txt"
           version "3.10.2"  // just add current installed version of CMake
    
       }
    }