After updating the Android SDK, I started Android Studio. Now its showing background task continuously running with message
Updating indices: Scanning files to index.
In this mode, it is nearly hanged and I can not work on it. Not able to find a way to stop background task. A restart of Android Studio didn't work either.
Recommended solutionScheduling deferred work through WorkManager is the best way to handle tasks that don't need to run immediately but which ought to remain scheduled when the app closes or the device restarts.
Android provides platform support to execute with and without a user interface. An Android service is defined as an application component that is generally used to perform long tasks in the background without needing user input.
Deferred tasks Every task that is not directly connected to a user interaction and can run at any time in the future can be deferred. The recommended solution for deferred tasks is WorkManager.
I've find out that I should use the solution of @free3dom which is the Invalidate Caches / Restart option
in the File menu.
I have to do this every time I change some project file by switching branches in GIT.
And yes, Android Studio really sucks and is full of bugs...
Unplug all the phones and plug them again, it gets working. It is related to adb as stated here : https://code.google.com/p/android/issues/detail?id=172387 and a known bug that is to be fixed in the future
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With