gpt4 book ai didi

windows - 执行.sh文件- “./gradlew no such file or directory”和其他错误

转载 作者:行者123 更新时间:2023-12-03 04:29:52 26 4
gpt4 key购买 nike

我正在尝试在Windows上运行.sh文件。更确切地说,我正在尝试在以下GitHub存储库中运行构建脚本:https://github.com/facebook/facebook-sdk-for-unity

但是对于.sh文件,我还是一个新手。通过在“Git Shell”中编写以下代码来执行文件:sh ./setup.sh

我不确定哪个错误实际上是“错误”,但是我已经大胆强调了我认为是重要的问题。还值得一提的是,我已经下载了Gradle 3.1并将其添加到我的path变量中。 gradle -v确实有效(在cmd中),但是gradlew作为命令无效。我想念什么?我觉得我好笨。 :/

我得到以下输出/错误:

D:\GitHub\facebook-sdk-for-unity [tmp-test-bashscripts]> sh .\scripts\setup.sh
/d/GitHub/facebook-sdk-for-unity/scripts/local.properties: line 1: sdk.dir=D:\Android\android-sdk\sdk: No such file or directory
sed: can't read /FacebookSdkVersion.cs: No such file or directory
.\scripts\setup.sh: line 25: buildAndCopyCore: command not found
.\scripts\setup.sh: line 26: buildAndCopyPlatformDLLs: command not found
/d/GitHub/facebook-sdk-for-unity/scripts/local.properties: line 1: sdk.dir=D:\Android\android-sdk\sdk: No such file or directory
sed: can't read /FacebookSdkVersion.cs: No such file or directory
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 75.1M 100 75.1M 0 0 359k 0 0:03:33 0:03:33 --:--:-- 372k
**/d/GitHub/facebook-sdk-for-unity/scripts/local.properties: line 1: sdk.dir=D:\Android\android-sdk\sdk: No such file or directory**
sed: can't read /FacebookSdkVersion.cs: No such file or directory
\033[0;36mStarting build \033[0m
\033[0;36mStep 1 - Cleaning wrapper libs folder \033[0m
/d/GitHub/facebook-sdk-for-unity/facebook-android-wrapper/libs /d/GitHub/facebook-sdk-for-unity
find: warning: you have specified the -maxdepth option after a non-option argument !, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

/d/GitHub/facebook-sdk-for-unity
\033[0;36mStep 2 - Get depenancies for android wrapper \033[0m
\033[0;36mStep 2.1.0 - Download bolts-android-1.4.0.jar \033[0m
\033[0;36mbolts-android-1.4.0.jar already exists. Skipping download. \033[0m
\033[0;36mStep 2.1.1 - Download bolts-tasks-1.4.0.jar \033[0m
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 178 100 178 0 0 546 0 --:--:-- --:--:-- --:--:-- 642
100 190 100 190 0 0 212 0 --:--:-- --:--:-- --:--:-- 690
100 38092 100 38092 0 0 28892 0 0:00:01 0:00:01 --:--:-- 28892
\033[0;36mStep 2.1.2 - Download bolts-applinks-1.4.0.jar \033[0m
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 178 100 178 0 0 650 0 --:--:-- --:--:-- --:--:-- 661
100 196 100 196 0 0 233 0 --:--:-- --:--:-- --:--:-- 233
100 25020 100 25020 0 0 20337 0 0:00:01 0:00:01 --:--:-- 228k
\033[0;36mStep 2.2 - Download facebook-android-sdk-4.14.0.aar \033[0m
\033[0;36mfacebook-android-sdk-4.14.0.aar already exists. Skipping download \033[0m
\033[0;36mStep 2.3 - Coping support lib \033[0m
\033[0;36mStep 3 - Build android wrapper \033[0m
/d/GitHub/facebook-sdk-for-unity/facebook-android-wrapper /d/GitHub/facebook-sdk-for-unity
**/d/GitHub/facebook-sdk-for-unity/scripts/setup_android_unity_plugin.sh: line 118: ./gradlew: No such file or directory**

\033[0;31mFATAL: Failed to perform gradle clean \033[0m

\033[0;31mFATAL: Failed to build the android sdk plugin \033[0m

最佳答案

看来您正在sh .\scripts\setup.sh或Git CMD窗口中运行cmd。而是打开一个Git Bash窗口。重要的是要看到其名称中的“Bash”。在该 shell 程序中,使用cd命令转到项目目录,然后按照文档中的说明运行sh ./setup.sh

关于windows - 执行.sh文件- “./gradlew no such file or directory”和其他错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40402307/

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