AndroidJUnit4.class is deprecated: How to use androidx.test.ext.junit.runners.AndroidJUnit4?

前端 未结 8 1651
傲寒
傲寒 2020-12-04 08:04

For my instrumentation tests I was using

@RunWith(AndroidJUnit4.class)

from

import androidx.test.runner.AndroidJUnit4;
         


        
8条回答
  •  一生所求
    2020-12-04 08:34

    I tried all given above until I went to the official Android site, and they suggested importing from androidx.test.ext.junit.runners.AndroidJUnit4 instead of androidx.test.runner.AndroidJUnit4. link

提交回复
热议问题