Reputation: 16209
In Android Studio 0.2.0, whenever I type anything in my build.gradle
files, Gradle decides it's time to rebuild. This takes a long time, generates noise and kills my battery life. It never ends as well, at least not until I finish editing the file… always rebuilding as I type. Lucky me I use Ubuntu with plenty of free memory.
So… I'd like to deactivate any option to auto make stuff. This is what I've tried so far:
Nothing works. I'd like a way to only build when I ask. Like a manual mode with a button. Something like that.
I understand Android Studio and the whole build system is very new, with lots of rough edges, but I'm hoping it's just a matter of an obscure flag definition in a file somewhere.
Previous research: this question does not provide enough details or goals, so I made my own. This G+ thread was a dead end as well. I'm still getting used to the new stuff and may be lost searching (i.e., missing the right keywords etc.), so sorry in advance if there are no updates on this issue.
Thank you.
Upvotes: 23
Views: 24546
Reputation: 1345
Additionally, if you are using Kotlin build script (Kotlin DSL), after disabled auto-import like @Xavier said, you need one more step: uncheck the Auto Reload checkbox of KotlinBuildScript under preference -> languages & frameworks -> Kotlin -> Kotlin Scripting.
Upvotes: 5
Reputation: 28539
under preferences > Gradle you can disable auto-import. With it selected it'll reimport the gradle project (which right now builds it first) every time you change the file.
Upvotes: 17