title: !!! JUnit version 3.8 or later expected
body: <p>My Android studio project has an app module which is android framework dependent, I have created a new module called domain and  it contains only pure java classes and a few test classes.</p>
  
  <p>In this module's build.gradle file, I have added junit and mockito libraries for testing purpose as follows:</p>
  
  <pre><code>apply plugin: 'java'
  sourceCompatibility = 1.7
  targetCompatibility = 1.7
  dependencies {
      testCompile 'junit:junit:4.11'
      testCompile 'org.mockito:mockito-core:1.9.5'
      compile project(':common')
      compile project(':model')
      //test dependencies
  }
  </code></pre>
  
  <p>But Android Studio is giving me <code>!!! JUnit version 3.8 or later expected</code> error message whenever I try to execute the test class.</p>
  
  <p>All the suggested solutions to this problem is to open the Project Structure | Modules | Dependencies, and move the junit-4.7.jar up, so that it comes before Android 1.6 Platform in the classpath.</p>
  
  <p>In fact, I have tried to implement this solution but the problem still exists.
  <img src="https://i.stack.imgur.com/el4UO.png" alt="Image of my dependencies structure"> </p>
  
  <p>Any idea on how to resolve this issue?</p>