Could not find Ninja on PATH or in SDK CMake bin folders
Closed this issue · 2 comments
zynzszyn521 commented
I use pdfrx: ^1.0.58 and distributionUrl=https://services.gradle.org/distributions/gradle-7.6.3-all.zip
, but my project show error
[CXX1416] Could not find Ninja on PATH or in SDK CMake bin folders.
[CXX1416] Could not find Ninja on PATH or in SDK CMake bin folders.
[CXX1416] Could not find Ninja on PATH or in SDK CMake bin folders.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':pdfrx'.
> com.android.builder.errors.EvalIssueException: [CXX1416] Could not find Ninja on PATH or in SDK CMake bin folders.
* 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
BUILD FAILED in 7s
Error: Gradle task assembleDebug failed with exit code 1
my flutter doctor
PS D:\MyProject\esop> flutter doctor
Flutter assets will be downloaded from https://mirrors.tuna.tsinghua.edu.cn/flutter. Make sure you trust this source!
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.19.2, on Microsoft Windows [版本 10.0.26100.1], locale zh-CN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6)
[√] Android Studio (version 2023.1)
[√] VS Code (version 1.88.1)
[√] Connected device (4 available)
[√] Network resources
• No issues found!
cmorbid commented
how to you solve this ?
espresso3389 commented
On #70, it is reported that upgrading Gradle may fix the issue:
Normally, if Android Studio/Flutter is correctly installed, ninja/cmake/ndk is automatically installed when building the code.
So please ensure the following things:
- Latest Android Studio
- Latest Flutter (Of course, stable version)
- Ensure that you're accepting all the android license terms
- Reboot after installation
- Ensure that your build machine is online (connectable to Google's server) during build