CMake抽风

android studio 3.0以后使用CMake编译c,c++报错

问题描述:同一份代码,早上编译还能通过,下午就行不行了

解决办法:卸载CMake插件,重新安装

报错内容:

Build command failed.
Error while executing process D:\Android\andrid\sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HD:\Android\git\0919\FaceRecognition-tag\fingerprintfm-70-library -BD:\Android\git\0919\FaceRecognition-tag\fingerprintfm-70-library\.externalNativeBuild\cmake\debug\arm64-v8a -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-21 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\Android\git\0919\FaceRecognition-tag\fingerprintfm-70-library\build\intermediates\cmake\debug\obj\arm64-v8a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=D:\Android\andrid\sdk\ndk-bundle -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_TOOLCHAIN_FILE=D:\Android\andrid\sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=D:\Android\andrid\sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file: D:/Android/git/0919/FaceRecognition-tag/fingerprintfm-70-library/.externalNativeBuild/cmake/debug/arm64-v8a/CMakeFiles/3.6.0-rc2/CMakeCXXCompiler.cmake
-- Configuring incomplete, errors occurred!
See also "D:/Android/git/0919/FaceRecognition-tag/fingerprintfm-70-library/.externalNativeBuild/cmake/debug/arm64-v8a/CMakeFiles/CMakeOutput.log".
Build command failed.
Error while executing process D:\Android\andrid\sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HD:\Android\git\0919\FaceRecognition-tag\fingerprintfm-70-library -BD:\Android\git\0919\FaceRecognition-tag\fingerprintfm-70-library\.externalNativeBuild\cmake\release\arm64-v8a -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-21 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\Android\git\0919\FaceRecognition-tag\fingerprintfm-70-library\build\intermediates\cmake\release\obj\arm64-v8a -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=D:\Android\andrid\sdk\ndk-bundle -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_TOOLCHAIN_FILE=D:\Android\andrid\sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=D:\Android\andrid\sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file: D:/Android/git/0919/FaceRecognition-tag/fingerprintfm-70-library/.externalNativeBuild/cmake/release/arm64-v8a/CMakeFiles/3.6.0-rc2/CMakeCXXCompiler.cmake
-- Configuring incomplete, errors occurred!
See also "D:/Android/git/0919/FaceRecognition-tag/fingerprintfm-70-library/.externalNativeBuild/cmake/release/arm64-v8a/CMakeFiles/CMakeOutput.log".
Build command failed.
Error while executing process D:\Android\andrid\sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HD:\Android\git\0919\FaceRecognition-tag\iolibrary -BD:\Android\git\0919\FaceRecognition-tag\iolibrary\.externalNativeBuild\cmake\debug\arm64-v8a -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-21 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\Android\git\0919\FaceRecognition-tag\iolibrary\build\intermediates\cmake\debug\obj\arm64-v8a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=D:\Android\andrid\sdk\ndk-bundle -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_TOOLCHAIN_FILE=D:\Android\andrid\sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=D:\Android\andrid\sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file: D:/Android/git/0919/FaceRecognition-tag/iolibrary/.externalNativeBuild/cmake/debug/arm64-v8a/CMakeFiles/3.6.0-rc2/CMakeCXXCompiler.cmake
-- Configuring incomplete, errors occurred!
See also "D:/Android/git/0919/FaceRecognition-tag/iolibrary/.externalNativeBuild/cmake/debug/arm64-v8a/CMakeFiles/CMakeOutput.log".
Build command failed.
Error while executing process D:\Android\andrid\sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HD:\Android\git\0919\FaceRecognition-tag\iolibrary -BD:\Android\git\0919\FaceRecognition-tag\iolibrary\.externalNativeBuild\cmake\release\arm64-v8a -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-21 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\Android\git\0919\FaceRecognition-tag\iolibrary\build\intermediates\cmake\release\obj\arm64-v8a -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=D:\Android\andrid\sdk\ndk-bundle -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_TOOLCHAIN_FILE=D:\Android\andrid\sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=D:\Android\andrid\sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file: D:/Android/git/0919/FaceRecognition-tag/iolibrary/.externalNativeBuild/cmake/release/arm64-v8a/CMakeFiles/3.6.0-rc2/CMakeCXXCompiler.cmake
-- Configuring incomplete, errors occurred!
See also "D:/Android/git/0919/FaceRecognition-tag/iolibrary/.externalNativeBuild/cmake/release/arm64-v8a/CMakeFiles/CMakeOutput.log".

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(CMake抽风)