title: Android Studio : buildTypes block won't collapse in build.gradle
body: <p>I was having the <em><code>buildTypes (and other things) cannot be applied to groovy.lang.Closure</code></em> error earlier - Now fixed by switching to default gradle wrapper in settings.</p>
  
  <p>But, after i changed to default gradle wrapper a strange thing started. I <strong>cannot collapse</strong> the <code>buildTypes</code> block in my <code>build.gradle</code> in Android Studio. (v 1.5.1)</p>
  
  <p>I can collapse every other block like <code>productFlavors</code>, <code>dependencies</code>, <code>defaultConfig</code> but just not <code>buildTypes</code>. Check screenshot below:</p>
  
  <p><a href="https://i.stack.imgur.com/GyxkE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GyxkE.jpg" alt="enter image description here"></a></p>
  
  <p>Even right-clicking with the cursor on the <code>buildTypes</code> keyword and selecting <code>Folding -&gt; Collapse</code> isn't working.</p>
  
  <p>My <code>build.gradle</code> is slightly huge with a lot of flavors and configurations for each and i really like to keep everything collapsed and expand only parts i need to view or edit.</p>
  
  <p>Anyone knows why this is happening and how it can be fixed?</p>