Obviously I need the correct import statment to solve this problem. According to the docs for AndroidJUnit4, this should be
import android.support.test.runn
If anyone still having this issue:
Cannot resolve symbol 'AndroidJUnit4'
and using API 27, in the build.gradle
which is in the app module, add the following lines:
testImplementation 'junit:junit:4.12'
// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
// Espresso dependencies
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'