adb shell am set-idle returns 测试应用程序待机时的未知命令

adb shell am set-idle returns unknown command when testing app standby

当运行

adb shell am set-idle package_name true

如建议here,它returns

Error: unknown command 'set-idle'

我错过了什么?

哈!找到正确答案here

文档页面有错误。 正确的命令应该是

adb shell am set-inactive package_name true