每次启动 Android Studio 时都会显示警告。
The current inotify(7) watch limit is too low.
我不明白这是怎么回事。我应该担心吗? 如何解决?
最佳答案
根据 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/