Why can't I import AndroidJUnit4 and ActivityTestRule into my unit test class?

后端 未结 8 566
一个人的身影
一个人的身影 2020-12-08 02:02

I\'m having trouble importing some of the Android UI testing framework classes - I just can\'t figure out what is going wrong!

This is my class:

@Run         


        
8条回答
  •  一生所求
    2020-12-08 02:27

    If you migrated to AndroidX, use this:

    androidTestImplementation 'androidx.test:rules:1.1.1'
    androidTestImplementation 'androidx.test:runner:1.1.1'
    

提交回复
热议问题