ndk吧 关注:3,608贴子:4,792
  • 23回复贴,共1

Android studio2.2.3 创建C++工程无法编译通过

只看楼主收藏回复



1楼2016-12-26 15:12回复
    External Native Build Issues
    Build command failed.
    Error while executing 'D:\sdk\cmake\3.6.3155560\bin\cmake.exe' with arguments {-HE:\andriodStudioworkspace\MyJniHello\app -BE:\andriodStudioworkspace\MyJniHello\app\.externalNativeBuild\cmake\debug\armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=D:\sdk\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\andriodStudioworkspace\MyJniHello\app\build\intermediates\cmake\debug\obj\armeabi -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=D:\sdk\cmake\3.6.3155560\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=D:\sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=19 -DCMAKE_CXX_FLAGS=}
    -- Configuring incomplete, errors occurred!
    See also "E:/andriodStudioworkspace/MyJniHello/app/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/CMakeOutput.log".
    CMake Error in CMakeLists.txt:
    The CMAKE_C_COMPILER:
    D:/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
    is not a full path to an existing compiler tool.
    Tell CMake where to find the compiler by setting either the environment
    variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
    the compiler, or to the compiler name if it is in the PATH.
    CMake Error in CMakeLists.txt:
    The CMAKE_CXX_COMPILER:
    D:/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
    is not a full path to an existing compiler tool.
    Tell CMake where to find the compiler by setting either the environment
    variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
    to the compiler, or to the compiler name if it is in the PATH.
    Error:executing external native build for cmake E:\andriodStudioworkspace\MyJniHello\app\CMakeLists.txt
    Build command failed.
    Error while executing 'D:\sdk\cmake\3.6.3155560\bin\cmake.exe' with arguments {-HE:\andriodStudioworkspace\MyJniHello\app -BE:\andriodStudioworkspace\MyJniHello\app\.externalNativeBuild\cmake\release\armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=D:\sdk\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\andriodStudioworkspace\MyJniHello\app\build\intermediates\cmake\release\obj\armeabi -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=D:\sdk\cmake\3.6.3155560\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=D:\sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=19 -DCMAKE_CXX_FLAGS=}
    -- Configuring incomplete, errors occurred!
    See also "E:/andriodStudioworkspace/MyJniHello/app/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/CMakeOutput.log".
    CMake Error in CMakeLists.txt:
    The CMAKE_C_COMPILER:
    D:/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
    is not a full path to an existing compiler tool.
    Tell CMake where to find the compiler by setting either the environment
    variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
    the compiler, or to the compiler name if it is in the PATH.
    CMake Error in CMakeLists.txt:
    The CMAKE_CXX_COMPILER:
    D:/SDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
    is not a full path to an existing compiler tool.
    Tell CMake where to find the compiler by setting either the environment
    variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
    to the compiler, or to the compiler name if it is in the PATH.
    Error:executing external native build for cmake E:\andriodStudioworkspace\MyJniHello\app\CMakeLists.txt


    2楼2016-12-26 15:17
    回复
      创建新工程 import C++无法编译通过,不知道是啥情况


      3楼2016-12-26 15:18
      回复
        你解决了吗 我有遇见了这个问题


        4楼2016-12-30 16:41
        回复
          看着像环境变量的问题


          IP属地:广东来自Android客户端5楼2016-12-30 20:34
          回复
            楼主大大,问题解决了吗?我遇到的跟你一毛一样,求赐教


            IP属地:海南6楼2017-03-31 15:32
            回复
              我这里有一些关于NDK的视频资料 和大家交流心得 留下你们邮箱 资料甩给你们嘻嘻


              9楼2017-06-07 16:03
              收起回复
                如何解决啊


                10楼2017-08-01 15:48
                回复
                  zhangyinlav9@163.com
                  谢谢大大


                  IP属地:安徽11楼2017-09-02 19:25
                  回复
                    其实这是NDK包版本的问题。下载新的NDK包,把AS的NDK路径指向自己的下载的NDK路径就可以编译成功(很久不看贴吧,忘记来给出解决方法了)


                    12楼2017-09-04 11:10
                    收起回复