Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想获取活动堆栈的当前大小以进行调试,有什么办法吗?
没有办法从设备上做到这一点(我知道),但如果是为了调试dumpsys activity,你总是可以从 adb shell 调用它,或者,在命令行中一次性调用,只是adb shell dumpsys activity
dumpsys activity
adb shell dumpsys activity