[英]Google Play Console signing error/invalid signature after rebuilding react-native
Our team decided to upgrade our react-native version from 0.59.x to 0.61.5.我们的团队决定将我们的 react-native 版本从 0.59.x 升级到 0.61.5。 We have so many difficulty upgrading it so we decide to start a new repo from fresh (npx react-native init appName) and copy over our code.
我们升级它有很多困难,所以我们决定从新的(npx react-native init appName)开始一个新的仓库并复制我们的代码。
After we make sure the app are running both on Android and ios simulator.在我们确保应用程序在 Android 和 ios 模拟器上运行之后。 We use the same scripts to build the .aab file and upload to Google Play Console.
我们使用相同的脚本来构建 .aab 文件并上传到 Google Play Console。 But Google Play Console won't let us.
但是 Google Play Console 不允许我们这样做。 This is the error message shown:
这是显示的错误消息:
Upload failed
上传失败
You uploaded an APK with an invalid signature (learn more about signing).
您上传的 APK 签名无效(了解有关签名的更多信息)。 Error from apksigner:
来自 apksigner 的错误:
There is no other error message after "apksigner:" so I am pretty sure it is a different problem than other similar questions on stack overflow. “apksigner:”之后没有其他错误消息,所以我很确定这是一个与堆栈溢出的其他类似问题不同的问题。
I am also sure that we are using the same keystore file我也确定我们正在使用相同的密钥库文件
Below is how we build our .aab file下面是我们如何构建 .aab 文件
curl "http://localhost:8081/index.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
cd $REPO_PATH/android
./gradlew bundleRelease
cd ..
# sign the aab
jarsigner -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/my-release-key.keystore $REPO_PATH/android/app/build/outputs/bundle/release/app.aab traytAndroidKey
# zipalign the aab and output it to another file
$HOME/Library/Android/sdk/build-tools/28.0.3/zipalign -f -v 4 $REPO_PATH/android/app/build/outputs/bundle/release/app.aab $REPO_PATH/android/app/build/outputs/bundle/release/app-release-signed-aligned-$VERSION_CODE.aab
Please help :(请帮忙 :(
It seems that you are uploading an AAB and not an APK.您上传的是 AAB 而不是 APK。 AABs don't need to be zip-aligned.
AAB 不需要是 zip 对齐的。 Try only signing with jarsigner.
尝试只使用 jarsigner 签名。
Also, try verifying the signature with jarsigner too.另外,也尝试使用 jarsigner 验证签名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.