flutter - Flutter:无法从存储中读取密钥:无法恢复密钥
问题描述
当我试图从 Android Studio 签署我的 Flutter 应用程序时,他们给了我一个错误
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageRelease'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> com.android.ide.common.signing.KeytoolException: Failed to read key myapp from store "/Volumes/PKData/Project/myapp/android/key.jks": Cannot recover key
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
我遇到了这个问题,并且在应用了许多解决方案后没有一个解决方案有效,但在我的情况下它现在仍然给出这个错误
关于如何修复它的任何想法以及如何发现密码必须相同?
解决方案
确保密钥库和私钥的密码匹配,并在 key.properties 文件中指定。
并确保新的密钥密码与密钥库密码相同。验证 key.properties 文件中是否也指定了相同的密码。
就我而言,问题是密钥存储密码和密钥密码不正确。所以生成一个新密钥,它将起作用(只需确保新密钥密码与密钥库密码相同)
推荐阅读
- python - 在带有 Django REST 框架的 Django 中,添加新字段时更新旧对象的最佳方法是什么?
- c# - 如何使用 HtmlAgilityPack 按名称选择 HTML 属性?
- awk - 如何使用 sed 从由空行分隔的文件部分打印某些行
- c# - Azure Blob 存储 Sas 错误:AuthenticationFailed
- r - 将所有数据的平均值移动到当前值
- r - 按组更改 ggplot2 中的 geom_*(例如,一组是线,下一组是点)
- deprecated - 函数 create_function() 已弃用
- android - CountDownTimer 没有取消
- python - 通过循环查找/存储斐波那契数列的前 50 个项
- c++ - C++ 中的运算符优先级