的数据
我正在为我的Android项目通过Azure管道。问题是local.properties文件在.gitignore中,因此无法找到此错误local.properties,我将其添加到安全文件中,现在在YAML文件中,我正在下载并安装taht安全文件。但我在CmdLine步骤中卡住了。行18错误##[错误]Bash退出代码“1”。,
至于管道yaml,我使用这个模板为android
# Android
# Build your Android project with Gradle.
# Add steps that test, sign, and distribute the APK, save build artifacts, and more:
# https://learn.microsoft.com/azure/devops/pipelines/languages/android
trigger:
- dev_pooja
pool:
vmImage: 'macos-latest'
steps:
- task: DownloadSecureFile@1
name: localProperties
displayName: 'Download Local Properties file'
inputs:
secureFile: 'local.properties'
- script: |
echo Installing $(localProperties.secureFilePath) to the trusted directory...
sudo chown root:root $(localProperties.secureFilePath)
sudo chmod a+r $(localProperties.secureFilePath)
sudo ln -s -f /etc/ssl/certs/ $(localproperties.secureFilePath)
- task: JavaToolInstaller@0
inputs:
versionSpec: '11'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- task: Gradle@2
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
publishJUnitResults: false
testResultsFiles: '**/TEST-*.xml'
tasks: 'assembleDebug'
- task: CopyFiles@2
inputs:
contents: "**/*.apk"
targetFolder: "$(build.artifactsStagingDirectory)"
- task: PublishBuildArtifacts@1
字符串
2条答案
按热度按时间l2osamch1#
错误行:
sudo ln -s -t /etc/ssl/certs/ $(localproperties.secureFilePath)
。尝试删除
-t
标志。此外,您可能需要-f
标志:如果目标文件已经存在,则取消链接,以便链接可能发生。祝您好运!zlhcx6iw2#
请尝试在代理上安装最新版本的Websh。