Android Studio:错误:org.gradle.tooling.BuildException:无法生成v1签名 [英] Android Studio: Error:org.gradle.tooling.BuildException: Failed to generate v1 signature

查看:1462
本文介绍了Android Studio:错误:org.gradle.tooling.BuildException:无法生成v1签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题出现在Android Studio 3.0中.

The problem is arising in Android Studio 3.0.

当我创建一个新项目时,一切正常,但一段时间后出现错误

When I create a new project, everything works fine but after sometime, the error

Error:org.gradle.tooling.BuildException:无法生成v1签名

Error:org.gradle.tooling.BuildException: Failed to generate v1 signature

开始自动出现,这会导致gradle失败.

Starts to appear automatically which causes the gradle to fail.

当我使用--stacktrace运行它时,这是向我显示的内容:

When I run it with --stacktrace, here's what it shows me:

Information:Gradle任务[:app:assembleDebug]

Information:Gradle tasks [:app:assembleDebug]

Error:org.gradle.tooling.BuildException:无法生成v1签名

Error:org.gradle.tooling.BuildException: Failed to generate v1 signature

错误:java.io.IOException:无法生成v1签名

Error:java.io.IOException: Failed to generate v1 signature

错误:java.security.InvalidKeyException:使用签名人"CERT"签名失败

Error:java.security.InvalidKeyException: Failed to sign using signer "CERT"

错误:java.security.InvalidKeyException:使用SHA1withDSA签名失败

Error:java.security.InvalidKeyException: Failed to sign using SHA1withDSA

错误:java.security.InvalidKeyException:SHA-1摘要算法的安全强度不足以实现此密钥大小

Error:java.security.InvalidKeyException: The security strength of SHA-1 digest algorithm is not sufficient for this key size

信息:1秒内失败

5个错误0个警告

这是Gradle控制台的完整要点要点

Here is the full Gist of the Gradle console Gist

我正在将Windows 10 X64与JDK 8 X64一起使用.

I am using Windows 10 X64 with JDK 8 X64.

任何帮助解决此问题的帮助将不胜感激!

Any help to solve this problem will be greatly appreciated!

推荐答案

我发现我能够通过使用以下命令行来构建新的密钥文件来解决此问题,如

I found I was able to fix this issue by using the following command line to build a new key file, as desribed at https://developer.android.com/studio/publish/app-signing.html:

keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias

具体来说,我认为问题在于默认情况下,默认值已从RSA更改为DSA,并且该工具无法与大型DSA密钥一起正常工作.

Specifically, I believe the problem is that the default has changed from RSA to DSA at some point, and the tools don't work correctly with large DSA keys.

这篇关于Android Studio:错误:org.gradle.tooling.BuildException:无法生成v1签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆