22

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.

wazev
  • 321
  • 1
  • 2
  • 4

1 Answers1

54

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!

enter image description here

Neil.Ling
  • 867
  • 7
  • 5
  • 1
    For me, it was looking for 3.18 v and I installed it. – showtime Sep 27 '22 at 14:46
  • I tried to follow what you did here as I need 3.19.6, however, the most recent versions I get whilst looking at Package Details are 3.18.1 and 3.22.1. Is there a way to add 3.19.6 if I have downloaded it directly from the CMake version archive? – Luke Beveridge Dec 06 '22 at 16:04
  • @LukeBeveridge you can follow the official guide listed here https://developer.android.com/studio/projects/install-ndk#vanilla_cmake to customize a specific Cmake version. – Neil.Ling Jan 06 '23 at 02:28