Attempt to mockito mock any class generates ExceptionInInitializerError

I received this error when I was missing the two dexmaker dependencies.

Adding these lines to the app/gradle.build file is working for me.

androidTestCompile 'org.mockito:mockito-core:1.10.19'
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'

I am also using Android Studio and have found it to be a good idea to restart AS after altering the dependencies.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)