Indexing freeze with message: Indexing paused due to batch updated
Asked Answered
F

23

143

I've updated Android Studio to version 3.2.

After that update one of my projects don't want to index.

It freezes with the message

"Indexing paused due to batch update".

How can I fix this?

File gradle-wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

File gradle-properties:

org.gradle.jvmargs=-Xmx1536m
org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.configureondemand=true
Fourlegged answered 26/9, 2018 at 8:18 Comment(4)
Do you have some product flavors in your build.gradle? Do you have other modules except "app"?Stripteaser
@aeracode not. I don't have any other modules except app.Fourlegged
For me the message was: Indexing paused due to batch update. Adding a comment so that Google and index properly :DHunley
Re-import the project is the only solution for me after trying all other solutionsWeanling
F
71

I faced the same issue with Android Studio 3.2. Invalidated the cache and restarted Android Studio, but it still did not work for me. Then I just re-imported the project and it worked!

Forcer answered 5/10, 2018 at 11:41 Comment(7)
I had the same problem in AS 3.2 and solve only re-importing too... ty :)Although
I solved it by deleting all the *.iml files and the .idea folderArmour
What do you mean "re-import"? Where is this option or how do I do this?Zootomy
I meant to import the project once again.Forcer
Same for me. "Open an existing project" and pulled my React Native's android folder in. Boom town. xMicronesian
(File->Invalidate Caches) worked for me after updating from 3.2 to 3.3Ruthy
work for me after close the project and re-import, thanksUrsulina
E
39

Just Restart (File > Invalidate Cache & Restart > Just Restart)

I faced this issue in Android Studio 3.+ when forcefully close Studio in between some gradle process.

Eld answered 22/10, 2018 at 16:38 Comment(3)
It works, but then I get https error when update Markdown support, need follow this thread to fix: #11571701Grunenwald
Re-import the project is the only solution for me after trying all other solutionsWeanling
It also happens if you edit a project using android-studio as root (i.e., with sudo). When you then try to use android-studio with the same project as regular user, it cannot overwrite the files root has created. Invalidating the cache and removing the .idea-, app/build- and .gradle-folder (requires sudo) solves the problem.Justness
A
34

Pressing the play button worked for me. It finished indexing and installed the apk in seconds. The catch is that I have to do this every time and batch does not seem to update.

Arbitrate answered 18/10, 2018 at 6:28 Comment(1)
It did work for me too...but do you know how to automate it?Novelistic
L
26

Click on the play button to the right of the progress bar.

Lingonberry answered 2/10, 2018 at 3:26 Comment(2)
after play button click it started to show Scanning files to index, but there is no change and nothing happens even after 10 mins. Progress bar is still loading. But, Close the project and reopen worked for me.Yorgen
@AdarshVijayanP This issue will happen again whether you restart studio or press the button. For most cases, clicking on play button would solve this issue. I hope this will be fixed with next update of Android Studio.Micromho
D
21

Press the play button to the right of this message and the issue would resolve.

You have to do it every time, because right now the problem is systematic and there is no solution to stop it from appearing.

Diffractometer answered 18/10, 2018 at 6:33 Comment(2)
This is the first thing what I try, doesn't helpFourlegged
omfg, I can't believe how much angst this issue caused me and it's resolved by clicking that tiny damn button I never even saw before.Antecedence
M
14

I invalidated the cache and restarted Android Studio. That worked for me. You can do this by: File > Invalidate Caches / Restart > Invalidate and Restart

Manna answered 28/9, 2018 at 14:40 Comment(2)
How can the cache be invalidated?Billie
Go to File > Invalidate Caches / Restart > Invalidate and RestartManna
V
12

I faced this issue many times and what I did everytime is:

Firstly, click on the processing bar on the bottom of the android studio.

A pop up window will appear on the screen like this- enter image description here

Click on the red circled Play button and let the process complete.

Please note that you will have to repeat this everytime you face this issue because this is some kind of bug or something in AS version 3.2

Optional: click on (-) minimize button if you want to the pop-up to minimize

Vaporescence answered 30/12, 2018 at 12:37 Comment(1)
@MarkBuikema But this is the solution which always works and I have tried and tested many other methods but none worked and this worked everytime so I posted this as answer. Hope this might help someone. I think they will fix this issue in the next update of android studio.Vaporescence
M
8

I faced the same issue, it seems that Android Studio messes up the cache.

Go to File > Invalidate Caches and Restart

Then on the Pop Up that appears choose Invalidate and Restart

Mithras answered 7/4, 2019 at 13:33 Comment(0)
S
6

Seems like there is an issue with Android Studio itself. I fixed the issue for now by following these steps:

  1. Click File > Invalidate Caches / Restart
  2. On the pop up choose Invalidate and Restart
Spousal answered 4/10, 2018 at 23:50 Comment(0)
M
6

Invalidated the cache -> restarted Android Studio -> re-import the project from the project location. Its worked for me

Macruran answered 19/11, 2018 at 15:56 Comment(0)
B
5

This is an issue in Android Studio since v3.2, I have posted an issue in Android Studio Issue Tracker, it's being finally accepted. Waiting for them to solve it.

Here is the issue tracker, you can follow up from here.

please star the issue as well to help solving it.

Buckra answered 31/1, 2019 at 8:43 Comment(1)
This does not provide solution to this answer. If you have posted an issue till then provide a temporary solution to this problem.Vaporescence
L
4

Stay Connected to internet.Let the batch to be updated.Wait one time and it will be easy the next time. OR...Click on the play button.

Lunitidal answered 6/10, 2018 at 8:40 Comment(0)
R
3

I saw this error and none of the solutions posted here worked for me. I had a specific scenario (see below), and I could get rid of the problem in my specific scenario. Not sure if the OP had the same scenario, by here are my two cents:

In my specific case I had two projects open in Android Studio, where one of the project was from a sshfs-mounted directory (the other project was local to my computer). I believe that made Android Studio throw the "Indexing paused due to batch updated" message on, strangely, both the projects.

To get rid of the error on the local project, I had to close the remote mounted project. On closing that project, the message was gone for my local project.

Hope that helps.

Reface answered 31/10, 2018 at 1:54 Comment(0)
S
3
  1. Close your project
  2. Go to your project root directory,
  3. Find and delete the xxx.iml file, the .idea and .gradle folders
  4. Re-open your project using Android Studio.
Shortcircuit answered 5/3, 2019 at 5:9 Comment(0)
Q
3

I had the same issue and I fixed by do the following: Click File --> click on Invalidate Caches / Restart You will see a pop up--> select Invalidate and Restart

Quintus answered 7/3, 2019 at 22:1 Comment(0)
F
1

I did it by exporting the project into zip file and open it like normal. you can export by clicking the file navbar and choose export to zip file

Farfetched answered 17/11, 2018 at 15:3 Comment(0)
N
1

I faced the same Issue but the situation which lead to this was different: I created a remote branch on the project's repository on GitHub and it was empty. And then I checkout to that branch locally while android studio was running.

I then deleted the local repository and created it again but this time it was not empty. Further I pushed the code to the remote branch as well.Now I thought that it will start the project normally but again the same happened.it resulted in an IDE error.

To solves this issue I deleted that local repository and again re-imported it.Than it started correctly.

Nitrate answered 20/12, 2018 at 11:22 Comment(0)
D
1

None of the other answers worked for me. Not even pressing the "play" button. All that worked was closing the project and re-opening it via "Open an existing Android Studio project".

The effect only lasts for a single session. As soon as I close and re-open the project, or AS 3.3, the problem re-appears.

Deleting C:\Users\<user>\.AndroidStudio3.3\config\options\recentProjects.xml (before starting AS 3.3) is an alternative way to accomplish the same thing.

EDIT

Upon upgrading to AS 3.3.2, this solution no longer worked. However, after an "Invalidate Caches and Restart", the problem disappeared.

Delorasdelorenzo answered 21/1, 2019 at 15:41 Comment(0)
R
0

Click on play button twice and then go to file->Invalidate Caches / Restart...

repeat this process every time whenever you face this issue.

Rebatement answered 18/3, 2019 at 16:35 Comment(0)
O
0

I solved it by deleting all the *.iml files and the .idea folder

Observance answered 2/4, 2019 at 11:42 Comment(0)
V
0

I faced the same issue, because my AS version is not the same with gradle plugin's version.

Venerable answered 29/5, 2019 at 5:4 Comment(0)
A
0

This issue coccus randomly in Android Studio V3.+ [Issue tracker:https://issuetracker.google.com/issues/118523471] .

There might be multiple reasons for this issue but it is mainly either ".gradle" related or ".iml" file related IntelliJ/Android Studio configurations.

Possible solutions:

  1. Click on play icon under the processing bar (on the bottom of the android studio). But be aware that multiple clicks may also kill the the indexing process.
  2. Invalidate cache (File -> Invalidate Cache & Restart -> Just Restart)
  3. Clean ((Build -> Clean project) and Rebuild (Build -> Rebuild Project)
  4. Sync Project with Gradle Files: Available options (depending on the Android Studio version) at
    • Tools -> Android -> Sync Project with Gradle Files
    • button available at top left corner in Android Studio's toolbar
    • File -> Sync Project with Gradle Files
  5. Delete the .idea & .gradle folders and .idea & .iml files from the project root directory and re-import the project

I have faced this issue quite a few times and got rid of then by using one or more of above solutions. But in some scenario nothing of the above solutions may work (as recently I get trapped-in). In this case I have to recreate the same project from scratch and copied back the required files into it. But ideally this should not be the solution. Please let me know if any other possible solution is there.

Anecdotal answered 5/6, 2019 at 20:24 Comment(0)
B
0

Invalidate cache and restart did the work for me. Now, the build is compiling in seconds.

Bassarisk answered 25/11, 2019 at 16:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.