title: Gradle buildConfigField BuildConfig cannot resolve symbol
body: <p>I am using Gradle to build my Android application. I am trying to use some flags based on the build type (release or debug).</p>
  
  <p>My Gradle file looks like this:</p>
  
  <pre><code>android {
      buildTypes {
          debug {
              buildConfigField 'boolean', 'PREPROD', 'true'
              buildConfigField 'boolean', 'STAGING', 'false'
          }
  
          release {
              buildConfigField 'boolean', 'PREPROD', 'false'
              buildConfigField 'boolean', 'STAGING', 'false'
          }
      }
  }
  </code></pre>
  
  <p>And if I try to call <code>BuildConfig.PREPROD</code> or <code>BuildConfig.STAGING</code> I get a "Cannot resolve symbol" error.
  The Gradle sync was successful, so I don't know if I forgot some steps in order to be able to use this feature?</p>
  
  <p>The generated <code>BuildConfig.java</code> file is the following (in <code>build/source/buildConfig/debug/com.example.myapp</code>):</p>
  
  <pre><code>package com.example.myapp;
  
  public final class BuildConfig {
    public static final boolean DEBUG = Boolean.parseBoolean("true");
    public static final String PACKAGE_NAME = "com.example.myapp";
    public static final String BUILD_TYPE = "debug";
    public static final String FLAVOR = "";
    public static final int VERSION_CODE = 400;
    public static final String VERSION_NAME = "";
  }
  </code></pre>