Android Studio CMake Error: Build Command failed

前端 未结 9 1451
孤独总比滥情好
孤独总比滥情好 2020-12-15 20:21

I\'m running into an Error when I open a new project in Android Studio from the Code Samples (Hello JIN). When the Project is opened the following:

Build com         


        
9条回答
  •  孤街浪徒
    2020-12-15 20:57

    I find this way can work:

    not need delete below:

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

    this is useful .and your project just less the ninja file .

    you can fllow this way can build successful!

    here is the result:

    Make was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
    

    you should install ninja

    1. download ninja here ninja download file
    2. get the ninja file
    3. copy the ninja file to the /usrlocal/bin
    4. build again .the project run successfull!!

提交回复
热议问题