Android Studio 显示警告 inotify limit is too low

标签 android performance android-studio

每次启动 Android Studio 时都会显示警告。

The current inotify(7) watch limit is too low.

我不明白这是怎么回事。我应该担心吗? 如何解决?

enter image description here

最佳答案

根据 IntelliJ documentation ,

For an intelligent IDE it is essential to be in the know about any external changes in files it working with - e.g. changes made by VCS, or build tools, or code generators etc. For that reason, IntelliJ platform spins background process to monitor such changes.

Inotify requires a "watch handle" to be set for each directory in the project. Unfortunately, the default limit of watch handles may not be enough for reasonably sized projects, and reaching the limit will force IntelliJ platform to fall back to recursive scans of directory trees.

因此,你需要添加

fs.inotify.max_user_watches = 524288

在“/etc/sysctl.conf”中

然后执行以下命令使其生效

sudo sysctl -p

关于Android Studio 显示警告 inotify limit is too low,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33959353/

相关文章:

performance - 减少PowerShell脚本的运行时间

javascript - Backbone subview 和事件解除绑定(bind)

AndroidStudio 上不显示 AndroidTest 文件夹

android-studio - Gradle 同步失败 : Connection refused

android - 如何使用 Android Studio 修复 twitter4j 中的 NoClassDefFoundError?

android - 无法使用 android studio 3.1.3 设置 ApkVariantOutputImpl_Decorated 的只读属性 'outputFile' 的值

android - 如何在调用 setContentView() 后以编程方式隐藏 android 2.2 中的标题栏?

android - ViewModelProviders 实例失败,因为无法解析 "of"

javascript - android 无法看到网络服务

mysql - "is not null"与 bool 值 MySQL - 性能