Tried out the suggestions on this post, but I still get the error:
!!! JUnit version 3.8 or later expected:
java.lang.RuntimeException: Stub!
at junit.r
Running into this when opening an old project into latest Android Studio 2.3 after it auto-updated the project.
Android Studio supports "Android JUnit" tests which should run using the current host JRE and properly support JUnit 4+. The error is due to the wrong JRE being used.
Solved by using Edit Configuration > select the Android JUnit configuration > edit the JRE. Select any choice, use Apply, then change it back to "Default (Android Platform)" for it work.