简体   繁体   English

重建 react-native 后 Google Play Console 签名错误/无效签名

[英]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.

相关问题 (React Native) 如何将应用签名密钥上传到 Google Play 控制台? - (React Native) How to uploading App Signing Key to Google Play Console? One Signal Google Play 服务库错误 React-Native - One Signal Google Play Services Library Error React-Native 在 Google Play 控制台上传我的 React Native/Expo 应用程序时出错 - Error at uploading my React Native/Expo app on Google Play Console 由于 Google Play 控制台的新政策,React-native Android 应用程序不断拒绝:敏感信息 - React-native Android app keeps rejecting because of new policies by google play console: sensitive informations 将 Android App Bundle 上传到 Google Play 控制台 - 密钥签名错误 - Uploading Android App Bundle to Google Play Console - key signing error Google Play App签名和签名级别权​​限 - Google Play App Signing and signature level permission Fastlane & React-Native:Google Api 错误:无效请求 - 未配置访问 - Fastlane & React-Native: Google Api Error: Invalid request - Access Not Configured 如何上传 react-native 0.54.3 android Apk 到 Play 商店? 它正在抛出 google play 64 位要求错误 - How to upload react-native 0.54.3 android Apk to play store? it is throwing google play 64-bit requirements error 错误:无效的挂钩调用 api FlatList react-native - Error: Invalid hook call api FlatList react-native 类型无效 — 应为字符串,react-native 错误 - type is invalid — expected a string, react-native error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM