Unable to find CMake in Android Studio

后端 未结 13 1055
暖寄归人
暖寄归人 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 22:56

    place path of the module where your cmake is exist

    if your cmake exist in app main

     externalNativeBuild {
                    cmake {
                            path "CMakeLists.txt"
                          }
                }
    

    if your cmake exist in any module

      externalNativeBuild {
                    cmake {
                        path file('../modulelib/CMakeLists.txt')
                    }
                }
    

    where "modulelib" is your library module folder name

提交回复
热议问题