首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >androidx.test.InstrumentationRegistry已弃用

androidx.test.InstrumentationRegistry已弃用
EN

Stack Overflow用户
提问于 2018-10-22 15:39:51
回答 6查看 24.9K关注 0票数 61

切换到AndroidX并收到弃用的:import androidx.test.InstrumentationRegistry

如果我做了下一个导入:import androidx.test.platform.app.InstrumentationRegistry,我就不能使用getContext()了。

例如:val context = InstrumentationRegistry.getContext()

build.gradle

androidTestImplementation 'androidx.test.ext:junit:1.0.0-beta02'
androidTestImplementation 'androidx.test:runner:1.1.0-beta02'
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52924431

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档