Android getTargetContext()报错

2024-05-21  本文已影响0人  唔使朙

报错:Context appContext = InstrumentationRegistry.getTargetContext();

改为:

Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

上一篇 下一篇

猜你喜欢

热点阅读