Objective
INotify will set "watch handle" for all folders within the project. Unfortunately, the limit for the Linux default watch handle does not meet the actual engineering size, and exceeding the limit will force the IntelliJ to rescan the recursive tree of the project directory (which can be time-consuming).
In order to avoid this problem, we recommend to modify the limit of watches (generally 521k), the following is the specific steps to resolve.
Problem Description:
Using Android Studio to import AOSP source code and indexing, the IDE may throw a warning "Kernel inotify Watch Limit reached" in the upper-right corner.
Workaround:
Open the /etc/sysctl.conf
file and add a sentence at the end of the file:
Fs.inotify.max_user_watches = 524288
Use the following command to make the modification effective:
Then restart your Android studio.
The above is the entire content of this article, I hope the content of this article can be helpful to the friends who encounter this problem, if there is doubt you can message exchange. Thank you for your support to the cloud-dwelling community.