After updating the Android SDK, I started Android Studio. Now its showing background task continuously running with message
Updating indices: Scannin
This was happening in my project every time I added a new Activity. So I included my R file in that class and it stopped.
eg: import com.domain.appname.R;
This fixed the problem.