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
I was having the same error and I fixed it by updating JRE value under "Edit Configurations..." in Android Studio, I used API 28 instead and then it worked. Please check the image for your reference...