skip to Main Content

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

3

Answers


  1. This also happened to me when I updated from Android Studio Arctic Fox to Bumblebee.

    What fixed it for me:
    Go to PreferencesClangd and enable Use clang-tidy via clangd (also enables some CLion builtin inspections)

    Login or Signup to reply.
  2. I have two kinds of errors

    Preferences -> Other settings

    1. -> Clang-Tidy

      disable Use external clang-tidy instead of built-in one:

      Solved Unable to execute Clang-Tidy: clang-Tidy is not found or cannot be executed

    2. -> Clanger

      enable Use clang-tidy via clangd

      Solved Unable to execute Clang-Tidy: clazy-standalone is not found or cannot be executed

    Login or Signup to reply.
  3. 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

    • If clazy is enabled, this error will be observed.

    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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search