Android 快速定位当前页面

Android 如何快速定位当前页面是哪个Activity or Fragment

查看当前activity:adb shell "dumpsys window w | grep name"
查看当前栈顶的activity:adb shell dumpsys activity |grep mFocusedActivity
通过logcat查看页面情况
as中通过Layout Inspector查看当前页面的调用栈

adb shell dumpsys activity activities |sed -En -e '/Running activities/,/Run #0/p'

你可能感兴趣的:(Android 快速定位当前页面)