Cannot resolve symbol 'AndroidJUnit4'
Obviously I need the correct import statment to solve this problem. According to the docs for AndroidJUnit4 , this should be import android.support.test.runner.AndroidJUnit4; When I do that, Android Studio highlights runner in red and complains "Cannot resolve symbol 'runner'". Background I got to this point by following the tutorials on the Android Developer site for setting up tests using UI Automator . The first problem I encountered was that com.android.support:support-v4:22.2.0 and com.android.support.test:runner:0.2 depend on different versions of com.android.support:support-annotations