无法与 Expo 签署 android apk

Impossible to signed android apk with Expo

我已经用 Expo 创建了一个应用程序,但是我很难将它上传到 Google Play,因为每次签名的 apk 都不对应 uploaded_certificate。

首先,我激活了应用签名 Google 使用我的密钥库 我生成了一个包含特定 jks 文件的文件。

其次,我按照这个 tutorial 尝试签署我的 apk 我尝试执行这一行 expo opt-in-google-play-signing,但是当对话框询问我是否启用了应用程序签名时,我说是,但没有任何反应。

因此,我将 jks 替换为我在第一步中使用的相同内容,当我尝试使用生成的签名 apk 时,我收到此错误消息:

You have imported an APK that is not signed with the import certificate. You must use the same certificate. The import certificate bears the following fingerprint

感谢您的帮助

我找到了解决方案,我使用此命令行 expo build:android --clear-credentials 来重置我的凭据。在对话框要求在 1) Let Expo handle the process! 2) I want to upload my own keystore!

之间 select 之后

我应该 select 第二次编辑并选择我的密钥库的路径。之后,当我上传 apk 时,一切正常!