1

I downloaded the Android Studio and trying to build a simple Login Activity. But the Make Project fails with this error.

Environment: Windows 7 64 bit

Gradle: trouble writing output: java.security.NoSuchAlgorithmException: SHA-1 MessageDigest not available

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':MyApp:dexDebug'.

    Running C:\Program Files (x86)\Android\android-studio\sdk\build-tools\android-4.2.2\dx.bat failed. See output

    Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


I have made sure the Gradle zip was downloaded and installed properly

Any hints what else should I check for?

pinkpanther
  • 4,770
  • 2
  • 38
  • 62
Ankur
  • 819
  • 2
  • 6
  • 16

1 Answers1

1

I was using IBM JDK. Switching to Sun/Oracle JDK fixed the problem.

Ankur
  • 819
  • 2
  • 6
  • 16
  • I also had this, yet the Oracle JRE was on my path. Turns out I had also set JAVA_HOME and JDK_HOME to the IBM ones – Wil Mar 04 '15 at 22:09