返回博主主页

Android创建上下文(appContext)

1.

    Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
    assertEquals("com.example.androidstudydemo", appContext.getPackageName());

 

posted @ 2021-11-02 12:12  懒惰的星期六  阅读(172)  评论(0编辑  收藏  举报

Welcome to here

主页