qq_33530085
qq_33530085
2017-07-28 04:36

android studio 3.0 preview 创建添加C支持的项目时报错

  • android-studio

错误如下:
Build command failed.
Error while executing process D:\Android\AndroidSDK\cmake\3.6.4111459\bin\cmake.exe with arguments {-HD:\Android\MyProject\TestC\app -BD:\Android\MyProject\TestC\app.externalNativeBuild\cmake\release\armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=D:\Android\AndroidSDK\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\Android\MyProject\TestC\app\build\intermediates\cmake\release\obj\armeabi -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=D:\Android\AndroidSDK\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=D:\Android\AndroidSDK\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-15 -DCMAKE_CXX_FLAGS=-std=c++11 -frtti -fexceptions}
-- Check for working C compiler: D:/Android/AndroidSDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: D:/Android/AndroidSDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken
CMake Error at D:/Android/AndroidSDK/cmake/3.6.4111459/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler
"D:/Android/AndroidSDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/Android/MyProject/TestC/app/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/CMakeTmp
Run Build Command:"D:\Android\AndroidSDK\cmake\3.6.4111459\bin\ninja.exe"
"cmTC_80963"
[1/2] Building C object CMakeFiles/cmTC_80963.dir/testCCompiler.c.o
[2/2] Linking C executable cmTC_80963
ninja: fatal: CreateProcess: ����IJ�����Ҫ������
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "D:/Android/MyProject/TestC/app/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/CMakeOutput.log".
See also "D:/Android/MyProject/TestC/app/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/CMakeError.log".那些乱码是“请求的操作需要提升”有谁知道这是这么回事么?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答