title: Android - DataBinding - How and when the Binding classes will be generated?
body: <p><a href="https://developer.android.com/tools/data-binding/guide.html" rel="noreferrer">DataBinding Guide</a> States</p>
  
  <pre><code>  By default, a Binding class will be generated based on the name of the layout 
  file, converting it to Pascal case and suffixing “Binding” to it. 
  The above layout file was activity_main.xml so the generate class was ActivityMainBinding.
  </code></pre>
  
  <p>When will the Binding class , here say ActivityMainBinding, will be generated. I have compile time error. "cannot resolve ActivityMainBinding".</p>
  
  <pre><code>ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.main_activity);
  </code></pre>
  
  <p>Any help is appreciated. Thanks </p>