Cannot resolve symbol InstantTaskExecutorRule

前端 未结 6 1139
一整个雨季
一整个雨季 2020-12-30 18:44

I open example code BasicRxJavaSample (from this article Room+RxJava) The main thing is there:

@Rule
public InstantTaskExecutorRule instantTaskExecutorRule          


        
6条回答
  •  鱼传尺愫
    2020-12-30 19:11

    Replace testImplementation by androidTestImplementation. So the tests on folder androidTest can have access to the library.

    dependencies {
        androidTestImplementation "androidx.arch.core:core-testing:2.1.0"
    }
    

    If you are not using androidx then use android.arch.core:core-testing:1.1.1

提交回复
热议问题