I\'m trying to compile my Android project in Android Studio 0.3.0. Today I get the following error:
Exception in thread \"main\" java.lang.NoClassDefFoundErr
For standard JUnit tests, you are missing the JUnit library, try adding this in build.gradle:
dependencies {
...
testCompile 'junit:junit:4.12'
...
}
And make sure you are putting the tests in the "test" directory parallell to the "main" package (instrumentation tests goes into "androidTest", but that is different setup).