问题 im using espresso to clear database in my app Im setting activity like this @Rule @JvmField val activity = ActivityTestRule<PhotoPrinterActivity>(PhotoPrinterActivity::class.java,false,false) And this is my before function @Before open fun setup() { clearDatabase() activity.launchActivity(null) // Waiting for start app success fully } And this is my clear database code fun clearDatabase() { val databaseList = InstrumentationRegistry.getInstrumentation().targetContext.databaseList() for