- 模拟器上的UI测试 - 可以
- 真实设备上的调试 - 可以
- 真实设备上的UI测试 - 无法启动并出现以下错误:
java.lang.AssertionError: Activity never becomes requested state "[STARTED, CREATED, RESUMED, DESTROYED]" (last lifecycle transition = "PRE_ON_CREATE") at androidx.test.core.app.ActivityScenario.waitForActivityToBecomeAnyOf(ActivityScenario.java:338) at androidx.test.core.app.ActivityScenario.launchInternal(ActivityScenario.java:272) at androidx.test.core.app.ActivityScenario.launch(ActivityScenario.java:195) .....
@LargeTest @RunWith(AndroidJUnit4ClassRunner::class) .....
ActivityScenario.launch(SplashActivity::class.java)