【问题标题】:React native - You uploaded an APK that is not signed with the upload certificateReact native - 您上传的 APK 没有使用上传证书签名
【发布时间】:2021-05-22 23:51:00
【问题描述】:

几个月前我上传了一个 Expo 项目,我不确定我是否签署了该应用程序,但运行 expo fetch:android:keystore 会给我以下信息:

密钥库密码

密钥别名

密钥密码

我使用 React Native CLI 启动了一个新项目,因此我使用上面的数据生成了一个新的密钥库文件,但在我尝试上传发布 APK 后 Google Play 显示了该错误消息

You uploaded an APK that is not signed with the upload certificate. You must use the same certificate. The upload certificate has fingerprint:
SHA1: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
and the certificate used to sign the APK you uploaded has fingerprint:
SHA1: YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY

我做错了什么?老实说,我不熟悉 Google Play 上的应用签名。 如何在不更改包名称和部署新应用的情况下从新的 RN CLI 项目上传新的 APK?我不想失去我现有的客户。

【问题讨论】:

    标签: react-native certificate google-play-console signing


    【解决方案1】:

    因此,对于遇到此问题的任何人,我所做的是将文件 app_name.jks 从 expo 项目文件夹复制到 android/app(RN CLI)并执行命令 expo fetch:android:keystore(Expo 项目)以获取Expo项目的密钥库、别名和密码。

    然后更改android/app/build.gradle(RN CLI)

    signingConfigs {
        release {
            storeFile file('app_name.jks')
            storePassword System.console().readLine("\nKeystore password: ")
            keyAlias 'here is the alias from the command above`'
            keyPassword System.console().readLine("\nKey password: ")
        }
    }
    

    然后执行构建命令./gradlew assembleRelease --no-daemon,控制台日志将询问密码和密钥库密码(来自上面的expo命令),就是这样!

    我能够使用相同的上传指纹上传到 Google Play

    【讨论】:

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