KeyError: 'WINDOWSSDKDIR' ERROR at //build/config/win/visual_studio_version.gni:27:7: Script returned non-zero exit code.
时间: 2024-01-26 20:02:04 浏览: 145
This error occurs when the script is unable to find the value of the environment variable "WINDOWSSDKDIR". To resolve this error, you can try the following steps:
1. Check if the environment variable "WINDOWSSDKDIR" is set on your system. You can do this by opening the command prompt and typing "echo %WINDOWSSDKDIR%". If the variable is not set, you can set it by following the instructions provided by Microsoft for your version of Windows.
2. If the variable is set, make sure it points to the correct directory. You can check this by navigating to the directory specified in the variable and verifying that it contains the necessary files.
3. If you are using a build system like Bazel or GN, make sure that the variable is set in the correct scope. For example, if you are using a build script that runs in a Docker container, you may need to set the variable in the Dockerfile.
4. If none of the above steps work, you can try reinstalling the Windows SDK and making sure that the environment variable is set correctly during installation.
If you still cannot resolve the issue, it may be helpful to consult the documentation for the specific build system or tool that you are using, or seek help from the community forums or support channels.
阅读全文