记录关于Android Studio NDK开发时Cmake报错以及解决方案

(问题)主要报错:

-- Configuring incomplete, errors occurred!

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

Build command failed.


(解决)项目模块配置build.gradle:

把app/build.gradle  ndk{} 里面的 'armeabi' 去掉

修改前:

        cmake {
            abiFilters "armeabi","arm64-v8a","armeabi-v7a","x86"
        }
修改后:
        cmake {
            abiFilters "arm64-v8a","armeabi-v7a","x86"
        }


(分析)报错原因:

查看提示信息,大概意是为对armeabi的支持 no longer

你可能感兴趣的:(记录关于Android Studio NDK开发时Cmake报错以及解决方案)