Solution to insufficient inotify size prompted by Android studio

preface

Inotify will set "watch handle" for all folders in the project. Unfortunately, the limit of Linux's default watch handle cannot meet the needs of the actual project size. Exceeding the limit will force IntelliJ to rescan the recursive tree of the project directory (which will be very time-consuming).

In order to avoid this problem, we recommend modifying and increasing the limit of watches (generally 521k). The following are the specific solutions.

Problem Description:

Use Android studio to import AOSP source code and after indexing, the warning "kernel inotify watch limit reached" may be thrown in the upper right corner of the IDE.

resolvent:

Open / etc / sysctl Conf file, add a sentence at the end of the file:

Use the following command to make the changes effective:

Then restart your Android studio.

The above is the whole content of this article. I hope the content of this article can be helpful to friends who encounter this problem. If you have any questions, you can leave a message. Thank you for your support for programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>