32

When I open Android Studio, it loads the last project, and runs build. I really don't need it to do this. If I save a project with errors in it, because I haven't got time to fix them, but plan on doing it later, I don't really want the compiler to try to compile it next time I open the project, because it's just going to fail.

Also it's pointless building the project on startup even if it doesn't have errors, because if the project doesn't have errors, I always build it to test it before I stop working on it, so the new build will be completely redundant. Thanks if anyone knows of a way to disable this. I've tried Googling and searching the settings but can't find anything.

Edit: this has become even more annoying since I moved to a slower computer for development. It already takes long enough for Android Studio to start up, having the program build just slows the startup even more.

yorkw
  • 40,926
  • 10
  • 117
  • 130
joe_deniable
  • 2,562
  • 3
  • 28
  • 38
  • IntelliJ by default doesn't build your project on start up, even when your project contains error. Android Studio probably does something different. – yorkw Jul 18 '13 at 23:12
  • Good news: This has been added as a feature for 0.2.2. They've been doing weekly updates, so hopefully this will be available by Friday. (https://android-review.googlesource.com/#/c/62462/) – Brian Jul 20 '13 at 14:34

5 Answers5

20

I've confirmed with a Google software engineer that this is currently not an option as of Android Studio 0.2.1. ( See 5th comment: https://plus.google.com/u/0/+XavierDucrohet/posts/1R2iPQzo4Zh )

I've also opened the following ticket as the engineer suggested: https://code.google.com/p/android/issues/detail?id=57831&thanks=57831&ts=1374268538

Hopefully this will be resolved in the near future! Until then, I guess we'll have to open Android Studio and grab a cup of coffee while the build completes.

Brian
  • 1,436
  • 8
  • 18
  • 1
    No problem! I have a big project, and it takes forever to open when the pointless auto build kicks off. – Brian Jul 19 '13 at 21:33
  • This has now reverted to the old behaviour of fully building the project when reopening it. Do you have any information on whether this will stay like this, or if a preference has been added to disable it? Thanks. – joe_deniable Sep 25 '13 at 11:11
  • I think it somehow got pared down to a subset of the build process upon loading Android Studio, and honestly I never noticed anything ever being noticeably better. :( My guess is that somebody at Google really wanted to keep it there. – Brian Sep 27 '13 at 01:18
  • 2
    I did notice an improvement, it stopped running a full compile on startup, but now, since 0.2.8 or thereabouts, it started again. I've put a comment on the ticket you opened. I do think the engineer at Google who argued against having this as an option was misguided. Intellij Idea/Android Studio already has thousands of confusing options, one more isn't going to make a difference, especially not to programmers. Though if this is the default behaviour with Idea I guess it's not really Google's fault. – joe_deniable Sep 27 '13 at 17:33
  • I wish I can code Android in Visual Studio... I want to go back to the darkside. – Neon Warge Dec 22 '15 at 13:07
4

I can confirm in latest version 0.8.x this functionality can be prevented by unchecking the Reopen last project on startup box in File -> Settings -> General.

phocks
  • 2,933
  • 5
  • 27
  • 28
0

Sounds like you have Make project automatically enabled.

This setting can be found in Settings -> Project Settings -> Compiler, under the Use external build setting.

You can also try disabling the Rebuild module on dependency change setting (it is in the same place).

free3dom
  • 18,729
  • 7
  • 52
  • 51
  • 2
    Thanks, but even with both of these unchecked, it still builds automatically at startup (or when you open a project). – joe_deniable Jul 05 '13 at 17:21
0

In the latest version (0.2.6) the switch is in

File/Settings - General under tick box 'Reopen last project on startup'

0

I'm using Android Studio(v135.1740770) in Mac Pro, open below file:

~/Library/Preferences/AndroidStudio/options/ide.general.xml

you will see option for autoSyncFiles, just change its value to false.

<option name="autoSyncFiles" value="false" />

Hope this helps.

xiaoweiz
  • 162
  • 3
  • 10