Android Studio: Background task running indefinitely

后端 未结 10 1189
心在旅途
心在旅途 2020-12-23 16:10

After updating the Android SDK, I started Android Studio. Now its showing background task continuously running with message

Updating indices: Scannin

10条回答
  •  甜味超标
    2020-12-23 16:35

    The indexing is triggered through inotify on Linux.
    There is a limit to how many directories a single user can set watches on. If your project is large, then this limit may be exceeded, and Android Studio falls back to recursive scanning mode, which is very slow.

    To fix this, add this line to /etc/sysctl.conf file:

    # Increase the limit for Android Studio
    `fs.inotify.max_user_watches = 500000`
    

    Then run sudo sysctl -p.

提交回复
热议问题