c++android-studiocmakejava-native-interfaceclang

Error:(1, 1) Unable to execute Clang-Tidy: clazy-standalone is not found or cannot be executed in AndroidStudio


In my AndroidStudio project I created native library using JNI with CMake and CPP code. Everything builds and runs OK, but when I try to commit and push my code to git, the CodeAnalysis appears in the "Messages" bottom tab, showing me an error:

Error:(1, 1) Unable to execute Clang-Tidy: clazy-standalone is not found or cannot be executed

In Preferences -> Other settings -> Clang-Tidy I see "Built-in Clang-Tidy version: 13.0.0" and an option to "Use external Clang-Tidy instead of the built-in one" (which is not set)

Could you please tell me where to find the settings of clazy-standalone (to set it) and/or at least to suppress the error message?

I am a newbie in C/CPP programming, writing mostly in kotlin/Java

P.S. I use MacBook Pro with MacOS BigSur 11.6.1 and AndroidStudio Bumblebee 2021.1.1 Beta 5


Solution

  • This came from https://issuetracker.google.com/issues/218346038


    This happens because Android Studio does not support clazy, but the option is still shipped in the settings menu, and in this case, it seems to be enabled.

    When clang-tidy via clangd is enabled, there is nothing to do.

    When clang-tidy via clangd is disabled, then

    To disable clazy, go to: Settings > Editor > Inspections > C++ and uncheck clazy.


    Note for Android Studio devs: We should check if we can disable this clazy feature in Android Studio. It seems to be a tool specific to some qt framework.