【问题标题】:When you uploaded an APK that is not signed with the upload certificate; do you have to use the same certificate?当您上传未使用上传证书签名的 APK 时;你必须使用相同的证书吗?
【发布时间】:2017-12-05 19:10:24
【问题描述】:

我正在使用 Android Studio 并正在尝试构建一个签名的 apk。 我正在使用以下步骤构建一个签名的 apk: 模块 --> 应用 KeyStorePath--> /Users/mshikher/Documents/SchoolCounter/app/Untitled (SchoolCounter 是项目的名称)。 输入keyStorePassword 和keyPassword 后点击NEXT。 单击 V1 和 V2 版本单击完成。 之前有人在 play.console 中上传了一个 apk,现在如果我尝试将我的 apk 上传到生产版本中,我会收到此错误。

You uploaded an APK that is not signed with the upload certificate. You must use the same certificate. The upload certificate has fingerprint:
[ SHA1: AA:6F:D6:9E:72:B7:9B:C6:45:63:70:69:66:B4:DA:9B:72:6D:3D:23 ]
and the certificate used to sign the APK you uploaded have fingerprint:
[ SHA1: 88:5D:A7:91:A9:5B:2C:66:DD:ED:13:96:37:49:D6:B7:4D:1E:B0:09 ]
You need to use a different version code for your APK because you already have one with version code 1.

我也在 build.gradle 文件中更改了版本号:

versionName "2.0"

我应该怎么做才能将我的 apk 上传到 play.google.com 中?

【问题讨论】:

标签: android google-play android-studio-3.0


【解决方案1】:

当您使用不同的 Keystore 签署您的 apk 时,就会发生这种情况。

您需要为您在 Playstore 上上传的所有版本使用相同的密钥库。请使用您发布上一个 apk 时使用的相同密钥库对您的 apk 进行签名。

欲了解更多信息,请查看此链接:https://developer.android.com/studio/publish/app-signing.html

【讨论】:

  • sckeystore.jks 是之前签过名的开发者给我的文件。我应该像这样给出keyStore路径的路径:/Users/mshikher/Documents/SchoolCounter/app/sckeystore.jks
  • 不需要。您唯一需要确保的是密钥库文件应该相同。
  • 确保您拥有相同的证书。您可以打印密钥库中的公钥吗?请参阅stackoverflow.com/questions/10103657/… 如果证书不匹配,就像错误消息中说的那样不匹配,那么它将无法工作。如果您确实找不到上传证书,Google Play 开发者支持应该能够帮助您迁移到新证书。
【解决方案2】:

您正在更改版本名称 versionName “2.0”,请将“versionCode”和“版本名称”都更改为其他,以便您可以上传它,第二件事请选择相同的 .jks 文件

您需要为您的 APK 使用不同的版本代码,因为您已经有一个版本代码为 1 的版本。
您需要更改版本代码。

【讨论】:

    猜你喜欢
    • 2020-07-03
    • 1970-01-01
    • 1970-01-01
    • 2021-05-22
    • 2018-08-12
    • 1970-01-01
    • 1970-01-01
    • 2018-11-07
    • 2016-09-17
    相关资源
    最近更新 更多