Flutter 崩溃报告

如果您未禁用 Flutter 的分析和崩溃报告,当一条 flutter 命令崩溃时,分析工具会尝试向 Google 发送一份崩溃报告,用于帮助 Google 逐步改进 Flutter。


If you have not opted-out of Flutter’s analytics and crash reporting, when a flutter command crashes it attempts to send a crash report to Google in order to help Google contribute improvements to Flutter over time. A crash report may contain the following information:

  • 您本地操作系统的名称和版本。

    The name and version of your local operating system.

  • Flutter 版本。

    The version of Flutter.

  • 错误的运行时类型,例如:StateError 或者 NoSuchMethodError

    The runtime type of the error, for example StateError or NoSuchMethodError.

  • 崩溃生成的堆栈跟踪信息,包含了对 Flutter CLI 代码的引用,但是不包含对您应用本身代码的引用。

    The stack trace generated by the crash, which contains references to the Flutter CLI’s own code and contains no references to your application code.

  • 客户端 ID:为安装了 Flutter 的计算机而生成的一串恒定且唯一的数字。它将帮助我们删除同一台计算机的重复崩溃报告。还可以帮助我们验证在升级了下一个 Flutter 版本后,解决方案是否按预期工作。

    A client ID: a constant and unique number generated for the computer where Flutter is installed. It helps us deduplicate multiple identical crash reports coming from the same computer. It also helps us verify if a fix works as intended after you upgrade to the next version of Flutter.

Google 会根据 Google 隐私政策 处理此工具报告的所有数据。

Google handles all data reported by this tool in accordance with the Google Privacy Policy.


Disabling analytics reporting

您可以通过运行以下命令,禁用 Flutter 提供的匿名崩溃报告和功能使用统计:

You can opt out of anonymous crash reporting and feature usage statistics from Flutter by running the following command:

$ flutter config --no-analytics

如果您选择禁用分析工具,分析工具会发送一个禁用事件,在此之后 Flutter 将不会上报更多信息。

If you opt out of analytics, an opt-out event will be sent, and then no further information will be sent by that installation of Flutter.


To display the current setting, you can run the following command:

$ flutter config