Android Studio Inotify Watches Limit(The current inotify(7) watch limit is too low. More details.)

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/AndroidMaLin/article/details/51271847

当我们启动 Android Studio时有时会发现有个提示。如下所示:

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

点击这个超链接后有一篇文章讲解如何处理这个问题。原文如下所示:

link https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit

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. The method it uses is platform-specific; and on Linux it is Inotify facility.

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.

To prevent this situation it is recommended to increase the watches limit (to, say, 512K).

You can do it by adding following line to the /etc/sysctl.conf file:
fs.inotify.max_user_watches = 524288


Then run this command to apply the change:
sudo sysctl -p

And don’t forget to restart your IDE.

Note: the watches limit is per-account setting. If there are other programs running under the same account which also uses Inotify the limit should be raised high enough to suite needs of all of them.

主要有三个步
This method is only suitable for Mac or Linux

1.在 /etc/sysctl.conf文件中增加一行
fs.inotify.max_user_watches = 524288

2.让改变生效
sudo sysctl -p

3.重启IDE

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值