Assigned
Status Update
Comments
np...@google.com <np...@google.com>
em...@google.com <em...@google.com>
em...@google.com <em...@google.com> #2
We will consider this as a feature request.
But, for the moment, in case you have not already done so, you can copy your ninja.exe
to the same directory as your downloaded cmake.exe
, and that should work around the issue.
em...@google.com <em...@google.com> #3
jomof@ Do you think we should swap the order of 2 and 3 in
jo...@google.com <jo...@google.com> #4
That seems reasonable
Description
DESCRIBE THE ISSUE IN DETAIL:
I'm trying to use NDK to build a C++ Android app. I have the latest Android Studio and am running on Windows 11. My goal is to install and use a newer CMake and Ninja, because I want to use C++20 modules.
I follow the instructions here , and installed a newer copy of CMake that what came with the NDK. There are 4 steps documented in that link. 1-3 work fine. But 4 does not. I need to install a newer Ninja. I did that, and I added it to my PATH environment variable. However Android Studio's build process does not pick it up. I get build errors like this:
Despite the fact that I can run the correct
ninja
from my Powershell:This function findNinjaPathLogic does not appear to use the Ninja on my path.
I think what we need is a way to set the Ninja path in the gradle configuration.
STEPS TO REPRODUCE:
ndkVersion
in the build.gradle.kts fileandroid {
ndkVersion = "26.2.11394342"
...
cmake.dir=C:\Program Files\CMake
android { ... externalNativeBuild { cmake { ... version = "3.29.0-rc1"
foo.cpp
CMakeLists.txt
Studio Build: Android Studio Hedgehog | 2023.1.1 Patch 1
Build #AI-231.9392.1.2311.11255304, built on December 26, 2023
Runtime version: 17.0.7+0-b2043.56-10550314 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 20
Registry:
external.system.auto.import.disabled=true
debugger.new.tool.window.layout=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.experimental.ui=true
Version of Gradle Plugin: 8.2.1
Version of Gradle: 8.2
NDK: 26.2.11394342
Version of Java: 17
OS: Windows 11