Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I stop Android Studio Indexing/Scanning/Building altogether at startup?

How can I stop this indexing or whatever this startup process? What is it for? Why is it doing it? Can I defer the loading of such huge process later on when I most need it?

like image 254
Neon Warge Avatar asked Feb 03 '16 13:02

Neon Warge


2 Answers

I solved it by just Invalidate and Restart. I experienced this isssue in a loop, indexing non stop without Run or Build anything.

File --> Invalidate Cache/Restart.

like image 160
Infinite Loops Avatar answered Nov 15 '22 02:11

Infinite Loops


You can actually cancel the build on start. I find this build to be pointless for a variety of reasons:

  • most devs would start the program then connect the phone/open the emulator first
  • even though the builds the app this doesn't mean much because when you click build again it starts over...

The way to cancel the build is just simply click on the little red x at the task at the bottom.

When you ready to build then you can just click on run again.

I consider this a bug because it's indeed pointless since it does not make consequent builds any faster nor it is required for the IDE to work unlike what the accepted answer suggests.

However mind that this does not the same as "Indexing" which is Android Studio indeed need. However on a normal startup case you can just cancel the build.

I have an open request for this at Google, we will see if they actually do something with it in the future since I don't see the point of wasting sometimes minutes for a initial build I cannot even use later.

like image 41
breakline Avatar answered Nov 15 '22 00:11

breakline