title: Android Data-binding - Cannot find the getter for attribute
body: <p>I used some spinner binding after seeing in <a href="https://stackoverflow.com/a/39444728/6891563">this answer</a>. But i am not able to compile code after that.</p>
  
  <p>Error </p>
  
  <blockquote>
    <p>Found data binding errors.
    ****/ data binding error ****msg:Cannot find the getter for attribute 'selectedValue' with value type java.lang.String on android.widget.Spinner.
    file:D:\Khemraj_AndroidStudioWorkspace_\amelioFinal\app\src\main\res\layout\activity_cart.xml
    loc:167:24 - 175:33
    ****\ data binding error ****</p>
  </blockquote>
  
  <p>Pojo</p>
  
  <pre><code>public class ViewModel {
      private String text;
      public String getText() {
          return text;
      }
  
      public void setText(String text)
      {
         this.text = text;
      }
  }
  </code></pre>
  
  <p>in xml</p>
  
  <pre><code>  &lt;variable
          name="viewModel"
          type="com.amelio.model.ViewModel"/&gt;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>  &lt;android.support.v7.widget.AppCompatSpinner
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:entries="@array/days"
              bind:selectedValue="@={viewModel.text}"/&gt;
  </code></pre>
  
  <p>bindingUtil</p>
  
  <pre><code>public class SpinnerBindingUtil {
  
      @BindingAdapter(value = {"selectedValue", "selectedValueAttrChanged"}, requireAll = false)
      public static void bindSpinnerData(AppCompatSpinner pAppCompatSpinner, String newSelectedValue, final InverseBindingListener newTextAttrChanged) {
          pAppCompatSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
              @Override
              public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                  newTextAttrChanged.onChange();
              }
              @Override
              public void onNothingSelected(AdapterView&lt;?&gt; parent) {
              }
          });
          if (newSelectedValue != null) {
              int pos = ((ArrayAdapter&lt;String&gt;) pAppCompatSpinner.getAdapter()).getPosition(newSelectedValue);
              pAppCompatSpinner.setSelection(pos, true);
          }
      }
      @InverseBindingAdapter(attribute = "selectedValue", event = "selectedValueAttrChanged")
      public static String captureSelectedValue(AppCompatSpinner pAppCompatSpinner) {
          return (String) pAppCompatSpinner.getSelectedItem();
      }
  
  }
  </code></pre>