欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 新闻 > 资讯 > 利用jdk自带keytool工具生成jks签名文件注意事项

利用jdk自带keytool工具生成jks签名文件注意事项

2025/9/24 23:04:13 来源:https://blog.csdn.net/u010725171/article/details/140706161  浏览:    关键词:利用jdk自带keytool工具生成jks签名文件注意事项

如题,用三个不同版本jdk生成jks文件,并配置到Android Studio里面验证,结果如下:
jdk1.8:正常
jdk11、jdk17:出错,错误日志如下

FAILURE: Build completed with 2 failures.1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:packageDebugAndroidTest'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable> com.android.ide.common.signing.KeytoolException: Failed to read key test from store "D:\AS_Project\AiDemo\app\test.jks": Invalid keystore format* 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.
==============================================================================2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable> com.android.ide.common.signing.KeytoolException: Failed to read key test from store "D:\AS_Project\AiDemo\app\test.jks": Invalid keystore format* 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.
==============================================================================* Get more help at https://help.gradle.orgDeprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warningsBUILD FAILED in 32s
94 actionable tasks: 17 executed, 77 up-to-date

结论:生成签名文件,建议使用jdk1.8

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词