13

Every time I load Android Studio (1.5), it runs gradle sync, even though nothing has changed since the last run. The funny thing is that a project that sync-ed properly yesterday will fail for random reasons today. Such as "Error:Cause: peer not authenticated" or "Could not reserve enough space for object heap".

Could I disable automatic gradle sync at startup?

Desik
  • 604
  • 2
  • 8
  • 21

3 Answers3

16

EDIT: It looks like this feature has been removed in the latest versions.

This is a little late, but for anyone else looking:

In "Settings" -> "Appearance & Behavior" -> "System Settings"

Uncheck "Synchronize files on frame or editor tab activation"

You'll have to remember to hit the "Sync Project with Gradle Files" button whenever you make changes to Gradle. (To the left of AVD Manager)

Mick
  • 676
  • 5
  • 12
  • 6
    Confirmed that this works (Android Studio 2.2.3). Next up is how to disable gradle BUILD on startup... – Nick Dec 10 '16 at 17:35
  • 1
    I can't find this option on Android Studio Electric Eel | 2022.1.1 Patch 2 – Tamim Attafi Apr 27 '23 at 14:04
  • @TamimAttafi, I'm running Flamingo and it looks like they removed this option. I can't find any alternative. – Mick Apr 28 '23 at 15:56
1

You can disable autoimport in Settings (Preferences) > Build... > Build Tools > Gradle

See How to disable automatic gradle builds?

Kshitiz Sharma
  • 17,947
  • 26
  • 98
  • 169
1

You can disable auto sync using below steps

Settings -> Appearance & Behavior -> System Settings Uncheck Synchronize files on frame or editor tab activation

Ikram
  • 41
  • 6