gpt4 book ai didi

android - Visual Studio 2017 在构建 Android 原生应用时找不到 clang.exe

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:56:15 25 4
gpt4 key购买 nike

我在 Visual Studio 2017 15.6.2 中创建了一个全新的 Android 原生项目,没有更改单个项目设置或源代码行,点击构建。它因以下错误而失败:

1>------ Build started: Project: AndroidNDKTest.NativeActivity, Configuration: Debug x86 ------
1>ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
1>ANT_HOME=
1>JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
1>NDK_ROOT=C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r13b
1>pch.h
1>TRACKER : error TRK0005: Failed to locate: "clang.exe". The system cannot find the file specified.

我不知道为什么找不到clang.exe,因为它存在:

C:\>dir /s C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r13b\clang.exe
Volume in drive C is OSDisk
Volume Serial Number is 1234-ABCD

Directory of C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r13b\toolchains\llvm\prebuilt\windows-x86_64\bin

03/08/2017 03:24 PM 43,847,680 clang.exe

最佳答案

我通过在 Visual Studio 中设置 Android NDK 的文件夹解决了这个问题。

  • 点击工具->选项...
  • 在选项对话框中查找跨平台->C++
  • 选中 Android NDK 复选框并在您的机器中选择正确的文件夹。可能路径已经正确,但您必须确保激活复选框。
  • 之后重启 Visual Studio

Options dialog configuration

关于android - Visual Studio 2017 在构建 Android 原生应用时找不到 clang.exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49268498/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com