先贴出报错信息
Execution failed for task ':examplecases:packageRelease'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
> com.android.ide.common.signing.KeytoolException: Failed to read key aaa from store "C:\Users\a\Desktop\NewProject\aaa.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.
报错信息显示我们要使用的key格式错误,首先先排除输错密码或者路径问题(自行反省低级错误),这种情况多半是发生在刚升级过as版本或者jdk版本的时候,jdk的版本过高或者过低都会发生此类问题。
解决方案:
打开file->settings。
将jdk版本设置为11,重新打包,问题解决。