我运行的Android 2.0工作室预览3B并试图用"生成签名APK ......"从生成菜单.
我收到以下错误消息窗格:
:wear:packageRelease FAILED FAILURE: Build failed with an exception. * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':wear:packageRelease'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) ... Error:org.gradle.tooling.BuildException: SHA256WITHDSA Signature not available: try using a newer JVM to build your application. at com.android.build.gradle.tasks.PackageApplication.doFullTaskAction(PackageApplication.java:224) at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:82) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) ... 70 more Error:java.security.NoSuchAlgorithmException: SHA256WITHDSA Signature not available at org.bouncycastle.jcajce.DefaultJcaJceHelper.createSignature(Unknown Source) at org.bouncycastle.operator.jcajce.OperatorHelper.createSignature(Unknown Source)
Android Studio使用的是JRE 1.7.0_55-b13 x86_64.
我看到尝试使用较新的JVM来构建您的应用程序.建议.它有助于升级Java吗?或者我该如何解决这个问题?
我还没有看到任何地方(例如http://tools.android.com/recent)Android Studio 2.0需要Java升级.
我刚刚得到了Android Studio 2.0(稳定版)的完全相同的问题com.android.tools.build:gradle:2.0.0
.
即使我的IDE使用JDK 1.8_u77运行,我仍然遇到了问题.
要修复它,去项目结构 > SDK位置>确保JDK的位置被设置为一个(至少1.8)最近的JDK!(在这篇文章发表时,最新的是1.8_u77).