Reputation: 421
Getting the following error when building my project in Android Studio:
[CXX1300] CMake '3.10.2' was not found in SDK, PATH, or by cmake.dir property.
My Gradle looks like the following:
externalNativeBuild {
cmake {
cppFlags "-std=c++11"
}
}
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
I have installed CMake in the SDK manager.
I have tried to remove cppFlags and replace with version 3.10.2 and path to the Cmake file; this causes the gradle to not sync at all.
I've tried looking at other threads with a similar problem, but doesn't seem to be able to fix my own problem.
Currently running Android studio bumblebee.
Any tip or help would be appreciated.
Upvotes: 32
Views: 34532
Reputation: 111
Today we just can't get cmake 3.10.2 from SDK manager, because google removed this package.
But you can make your own build of cmake for ndk.
First, download cmake 3.10.2 from github, and get actual ninja binary from ur installed newest cmake. Place build to cmake
folder in sdk path.
For macOS (only x86, but still works via rosetta 2) i have done build on github: https://github.com/kotleni/ndk-cmake-3.10.2
Upvotes: 0
Reputation: 1137
While the latest version of cmake is 3.18.1, it looks like Bumblebee
is still looking for ver 3.10.2 by some rules it defines, which ended up with a mismatched version error.
Makes sure Cmake 3.10.2 is checked and installed in SDK tools. By the way, check "Show Package Details" in [Android SDK] -> [SDK Tools] -> CMake, to list all available CMake versions.
Good luck!
Upvotes: 80