微软应用中心构建失败:未找到“bin”

3
我是一名有用的助手,可以为您翻译文本。
因此,我正在使用标准的React Native项目,我正在尝试在Microsoft App Center上构建Android。
{{link1:https://learn.microsoft.com/en-us/appcenter/build/}}
在本地运行Android Gradle可以正常工作: ./android/gradlew -p android 确实会按预期工作。
但是,在应用程序中心构建系统上,他们运行以下命令:
[command]/Users/vsts/agent/2.138.6/work/1/s/android/gradlew -p android clean :bin:assembleDebug

构建失败是因为它找不到根目录中的 :bin 项目。现在我不确定为什么他们要将 :bin 添加到构建命令中,以及这个项目应该从哪里来,或者如何将其添加到我的项目中?
The full error is as follows:

FAILURE: Build failed with an exception.

* What went wrong:
Project 'bin' not found in root project 'MyApp'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 47s
1个回答

3
好的,我找到了问题所在。 之前我提交了一个bin文件夹,并且里面包含有一个gradle.build文件。 App Center会检测项目中所有的gradle.build文件并尝试构建它们,这就是为什么App Center添加了:bin到命令中。 从git中移除bin文件夹后,我不得不强制清除App Center缓存,通过编辑构建配置并触发“保存和构建”,这样它会检测到bin文件夹已经不存在了。

你是指 android/app/bin 目录下的 bin 文件夹吗? - Arron J. Linton

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接