0

I often modify spaces, statement alignments and tabulations manually instead of using CTRL+ALT+L for formating my code. Then, it takes a long time to launch my app because Android Studio creating a new build even if the code itself is the same.

enter image description here

Is there a way to change this setting ?

Galabyca
  • 153
  • 1
  • 14
  • What does "creating a new gradle" mean? – Code-Apprentice Feb 17 '16 at 21:00
  • I added a picture. It's large so I suggest you ot click on it an open in a new tab so see it will. – Galabyca Feb 17 '16 at 21:04
  • The message "Gradle Build Running" at the bottom of the screen means that Android Studio is compiling your code. This will happen every time you run your app because that's how Android Studio works. – Code-Apprentice Feb 17 '16 at 21:05
  • You should check out http://stackoverflow.com/questions/23367769/how-to-speed-up-android-studio-compilation-process for some tips to speed up gradle. – Code-Apprentice Feb 17 '16 at 21:06

1 Answers1

1

Android Studio compiles any file when it changes. Even if the change is just in formatting, it will be recompiled. I suggest that you make sure the formatting is the way you want it when you write the code to begin with. Android Studio is very good at helping you with this by automatically indenting when it deems it appropriate. Don't fight against Android Studio's default behaviors -- or else configure Android Studio to the formatting settings you wish to use.

Code-Apprentice
  • 81,660
  • 23
  • 145
  • 268