title: Data Binding - Type parameter T has incompatible upper bounds : ViewDataBinding and SimpleCalculatorActivity
body: <p><strong>File name</strong> : SimpleCalculatorActivity.java</p>
  
  <p><strong>Xml file name</strong> : simple_calculator.xml</p>
  
  <p>I am getting the error message <strong>Data Binding Android - Type parameter T has incompatible upper bounds : ViewDataBinding and SimpleCalculatorActivity</strong> in the line <code>binding = DataBindingUtil.setContentView(this, R.layout.simple_calculator);</code></p>
  
  <p>I have tried renaming the xml file and rename it back to original name. But did not work for me.</p>
  
  <blockquote>
    <p>SimpleCalculatorActivity.java</p>
  </blockquote>
  
  <pre><code>package com.example.borntoflirt.design1;
  
  import android.databinding.DataBindingUtil;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  
  import java.text.DecimalFormat;
  
  public class SimpleCalculatorActivity extends AppCompatActivity {
  
  private SimpleCalculatorActivity binding;
  
  // This simple calculator can only perform operations of either addition, subtraction, multiplication or division.
  // So we define four static chars to represent these operations
  
  private static final char ADDITION = '+';
  private static final char SUBTRACTION = '-';
  private static final char MULTIPLICATION = '*';
  private static final char DIVISION = '/';
  
  // Set variable for operations
  
  private double digit;
  private double total = Double.NaN;
  private String CURRENT_ACTION;
  
  private DecimalFormat decimalFormat;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      decimalFormat = new DecimalFormat("#.##########");
      binding = DataBindingUtil.setContentView(this, R.layout.simple_calculator);
  }
  }
  </code></pre>