androidx.test.InstrumentationRegistry is deprecated

后端 未结 6 868
耶瑟儿~
耶瑟儿~ 2020-12-24 04:49

Switched to AndroidX and received deprecated: import androidx.test.InstrumentationRegistry.

If I made next import: import androidx.te

6条回答
  •  一生所求
    2020-12-24 05:44

    I spent a lot of time moving dependency with testImplementation instead of androidTestImplementation and reverse, in the app build.gradle.

    My fault was that I have created the test class in the test folder instead of androidTest folder so getting unresolved error for AndroidJuit4 and InstrumentationRegistry.

    When I shifted my test file to the androidTest folder then issue been solved with depandency implementation of test libraries with androidTestImplementation in the build.gradle.

提交回复
热议问题