English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Solution for Android Studio Prompting 'inotify size insufficient'

Preface

Inotify will set 'watch handle' for all folders in the project. Unfortunately, the default watch handle limit of Linux cannot meet the needs of the actual project size. When the limit is exceeded, IntelliJ will be forced to rescan the recursive tree of the project directory (which will take a very long time).

To avoid this kind of problem, we recommend modifying and increasing the limit value of watches (usually521k is enough), and the following are the specific steps to solve the problem.

Problem Description:

When importing AOSP source code with Android Studio and indexing is complete, a warning 'Kernel inotify watch limit reached' may be thrown at the top right corner of the ide.

Solution:

Open/etc/Add a sentence at the end of the sysctl.conf file:

fs.inotify.max_user_watches = 524288

Use the following command to make the modification take effect:

sudo sysctl -p

Then just restart your Android Studio.

That's all for this article. I hope the content of this article can help those who encounter this problem. If you have any questions, you can leave a message for communication. Thank you for your support of the Yelling Tutorial.

You May Also Like