Android Studio Mac OSX Installation Error — NoClassDefFoundError: Could not initialize class javax.crypto.SunJCE_b

Today I decided to play with Android and build a simple app. I downloaded the latest version of Android Studio for Mac from the official website As soon as I tried to install the Android Studio on my Mac book (OSX YoseMite 10.10.2) I was greeted with a weird error message as shown below.

Internal error. Please report to

java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.SunJCE_b
at javax.crypto.KeyGenerator.a(DashoA13*..)
at javax.crypto.KeyGenerator.(DashoA13*..)
at javax.crypto.KeyGenerator.getInstance(DashoA13*..)

You get this error because you need to have Java 6 installed on your Mac. To get rid of this error, just download the Java from this link Once Java 6 is installed, open the Android Studio app again and you will be able to work with Android Studio 🙂