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

错误如下:
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个回答

已经解决了,在启动android studio的时候选择以管理员身份运行就可以了!

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问