Android Studio 2.0 - NoSuchAlgorithmException: SHA256WITHDSA Signature not available

I am running Android Studio 2.0 Preview 3b and trying to use the "Generate Signed APK ..." in the Build menu.

I get the following error message:

: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 uses JRE 1.7.0_55-b13 x86_64 .

I see how trying to use the new JVM to build your application. . Did he help update Java? Or how can I solve this?

I have never seen (for example, http://tools.android.com/recent ) that Java Studio is required for Android Studio 2.0.

+7
java android android-gradle
source share
3 answers

I got exactly the same problem with Android Studio 2.0 (stable version) with com.android.tools.build:gradle:2.0.0 .

Despite the fact that my IDE worked with JDK 1.8_u77, I still had a problem.

To fix this, go to Project Structure > SDK Location> make sure the JDK location is set to a (at least 1.8) recent JDK ! (at the time of this post, the latter is 1.8_u77).

+6
source share

I ran into a problem changing the version of the Android module for Gradle from com.android.tools.build:gradle:2.0.0-alpha2 to com.android.tools.build:gradle:1.5.0 in the build.gradle project.

I updated the plugin to use Instant Run.

In addition, tskulbru proposal for skipping building wear module also worked.

Other attempts to fix this that failed :

  • Separate installation of Android Studio 1.5.0 and 1.5.1 (stable channel)
  • Upgrade to com.android.tools.build:gradle:2.0.0-alpha3 (and later to beta6)
  • Upgrade to JDK 8u74
  • Update to Android Studio 2.0 Beta 6
+1
source share

The version of JDK used by your system should be the same as the version used by Android Studio. For example, if running java -version tells you that you are using version 1.7, then for Android Studio you need to set the value to 1.7. This is not a problem using versions below 1.8 ... I am using 1.7.

0
source share

All Articles