【问题标题】:App center build, Error: /usr/bin/jarsigner failed with return code: 1应用中心构建,错误:/usr/bin/jarsigner 失败,返回码:1
【发布时间】:2018-07-25 12:28:21
【问题描述】:

当我尝试构建时使用应用中心,我目前收到此错误:

[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

任何想法如何解决这个问题?

【问题讨论】:

    标签: android visual-studio-app-center


    【解决方案1】:

    构建成功,但管道在签名时失败。在您的构建配置中,Keystore 密码Key 别名Key 密码 的环境变量设置不正确。

    【讨论】:

      【解决方案2】:

      在您的 android/app/build.gradle 中,确保您没有为发布配置提供 signingConfig:

      buildTypes {
              debug {
                  signingConfig signingConfigs.debug
              }
              release {
                  // ...
                  // signingConfig signingConfigs.debug <-- should not be used on Appcenter
                  // ...
              }
          }
      

      【讨论】:

      • 非常感谢
      【解决方案3】:

      我遇到了这个问题,但解决方法不同。

      这是由于我的项目中没有 .gitignore 文件,因此 /Debug 和 /Release 文件夹都被推送到了 repo。

      Build Error issue - helped identify my issue

      How to add a git ignore in visual studio

      【讨论】:

        猜你喜欢
        • 2020-01-29
        • 2017-02-01
        • 2012-02-29
        • 2015-05-26
        • 1970-01-01
        • 1970-01-01
        • 2018-07-19
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多