Unable to find CMake in Android Studio

后端 未结 13 1060
暖寄归人
暖寄归人 2020-12-07 22:37

I need to add C/C++ code in my Android program for which I needed LLDB, CMake, and NDK. I found LLDB and NDK in SDK manager, but CMake is missing from there. I tried manuall

13条回答
  •  天命终不由人
    2020-12-07 23:02

    1. Check in your build.gradle file for your App's module

      externalNativeBuild {
          cmake {
              path "CMakeLists.txt"
          }
      }
      
    2. Remove the cmake section

    3. Re-synchronise the project: go to menu Build -> Refersh Lined C++ Projects

    4. Right-click on the module, such as the app module, select "Link C++ Project with Gradle" from the menu.

    5. You should see a dialog similar to the one shown in below figure.

    6. Click OK.

提交回复
热议问题