Issue
I update android-studio to the latest canary build (2020.3.1 Canary 3), but I'm getting the following error:
C/C++ debug|arm64-v8a : CMake Error: CMake was unable to find a build program corresponding to "Ninja"
when trying to build. I have followed the upgrade for gradle that android studio suggests (after upgrading to android studio canary), and have the following in my top level build.gradle:
dependencies {
....
classpath 'com.android.tools.build:gradle:7.0.0-alpha03
}
Furthermore, some relevant parts of my app/build.gradle
:
defaultConfig {
applicationId "com.imerso.scanner"
minSdkVersion 23
targetSdkVersion 30
versionCode gitVersionCode
versionName gitVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
arguments "-DFOO_DIR=./thirdparty/FOO/cmake", '-DANDROID_STL=c++_shared'
abiFilters "arm64-v8a", "x86_64"
}
}
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas".toString())
}
}
}
externalNativeBuild {
cmake {
version "3.14.3"
path file('src/cpp/CMakeLists.txt')
}
}
ndkVersion = '20.1.5948944'
Also, I have installed ninja-build
(using sudo apt install ninja-build
), and this used to work with previous versions of android studio.
Solution
Updating cmake from version 3.14.3 to 3.16.3 did the trick
Answered By - simen-andresen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.