android 中严格模式线程策略的确切用途是什么?

What is the exact use of Strict mode Thread policy in android?

Strict mode Thread policy class 是否有助于 manage/handle 错误?

如果是,是什么类型的错误?

StrictMode is a developer tool which detects things you might be doing by accident and brings them to your attention so you can fix them.

警告:不要将严格模式用作在主线程上执行网络操作的 hack,因为它会阻塞您的 UI 线程。这是一个非常非常糟糕的做法。严格模式是为了帮助您捕获任何 "accidental programming" 开发者

StrictMode is most commonly used to catch accidental disk or network access on the application's main thread, where UI operations are received and animations take place. Keeping disk and network operations off the main thread makes for much smoother, more responsive applications. By keeping your application's main thread responsive, you also prevent ANR dialogs from being shown to users.

因此,您可以使用 StrictMode 捕获 Disk/Network 访问权限,而不会导致您的应用程序崩溃。在 GP 上启动您的应用程序时请小心将其关闭。