App center build, Error: /usr/bin/jarsigner failed with return code: 1
App center build, Error: /usr/bin/jarsigner failed with return code: 1
当我尝试构建时使用应用程序中心我目前收到此错误:
[command]/usr/bin/jarsigner -keystore /Users/vsts/agent/2.136.1/work/1/s/.certs/keystore.jks -storepass *** -keypass *** -verbose -sigalg MD5withRSA -digestalg SHA1 -signedjar /Users/vsts/agent/2.136.1/work/1/s/android/app/build/outputs/apk/app-release.apk /Users/vsts/agent/2.136.1/work/1/s/android/app/build/outputs/apk/app-release.apk.unsigned ***
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 11019 but got 11226 bytes)
##[error]Error: /usr/bin/jarsigner failed with return code: 1
##[error]Return code: 1
有什么解决办法吗?
构建成功,但管道在签名时失败。在您的构建配置中,Keystore 密码、Key 别名 或 Key 密码 的环境变量是没有正确设置。
我遇到了这个问题,但解决方案不同。
这是因为我的项目中没有 .gitignore 文件,所以 /Debug 和 /Release 文件夹都被推送到 repo。
在您的 android/app/build.gradle 中,确保您没有为发布配置提供签名配置:
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// ...
// signingConfig signingConfigs.debug <-- should not be used on Appcenter
// ...
}
}
当我尝试构建时使用应用程序中心我目前收到此错误:
[command]/usr/bin/jarsigner -keystore /Users/vsts/agent/2.136.1/work/1/s/.certs/keystore.jks -storepass *** -keypass *** -verbose -sigalg MD5withRSA -digestalg SHA1 -signedjar /Users/vsts/agent/2.136.1/work/1/s/android/app/build/outputs/apk/app-release.apk /Users/vsts/agent/2.136.1/work/1/s/android/app/build/outputs/apk/app-release.apk.unsigned ***
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 11019 but got 11226 bytes)
##[error]Error: /usr/bin/jarsigner failed with return code: 1
##[error]Return code: 1
有什么解决办法吗?
构建成功,但管道在签名时失败。在您的构建配置中,Keystore 密码、Key 别名 或 Key 密码 的环境变量是没有正确设置。
我遇到了这个问题,但解决方案不同。
这是因为我的项目中没有 .gitignore 文件,所以 /Debug 和 /Release 文件夹都被推送到 repo。
在您的 android/app/build.gradle 中,确保您没有为发布配置提供签名配置:
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// ...
// signingConfig signingConfigs.debug <-- should not be used on Appcenter
// ...
}
}