Cannot resolve symbol 'AndroidJUnit4' for Android instrumentation test
<p>This error has been faced a lot before and asked here. According to the answers, i had to put my instrumentation tests under androidTest folder. So after that, in my case, am still unable to import the <strong>AndroidJunit4</strong> class and the pop-up suggestion dialog has now a new option : <strong>Setup JDK</strong> wich i am surprised with. Anyway i have followed the option and chosen the proper JDK but the problem is still there and the dialog still suggests the same option.</p>

<p>Does anyone know what is the problem here ?</p>

<p><strong>EDIT : My gradle dependencies:</strong></p>

<pre><code>  dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-annotations:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.parse.bolts:bolts-tasks:1.3.0'
compile 'com.parse:parse-android:1.13.1'

androidTestCompile 'junit:junit:4.12'

androidTestCompile 'com.android.support:support-annotations:23.4.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'

 androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',   {
     exclude group: 'com.android.support', module: 'support-annotations'
    })
   }
</code></pre>