title: How to resolve "Cannot find the setter for attribute" when using databinding in Android Studio
body: <p>I am trying to get databinding to work in Android Studio with custom BindingAdapters. </p>
  
  <p>I have defined the following BindingAdapter in order to set an image:</p>
  
  <pre><code>@BindingAdapter("app:iconImage")
  @JvmStatic fun setIconImage(view: ImageView, cool: Boolean){
          view.setImageDrawable(determineImage(cool, view.context))
  
  }
  </code></pre>
  
  <p>However this raises the following error when building the project:</p>
  
  <pre><code>****/ data binding error ****msg:Cannot find the setter for attribute 
  'app:iconImage' with parameter type androidx.databinding.ObservableBoolean 
  on android.widget.ImageView.
  </code></pre>
  
  <p>This is my xml for the imageview:</p>
  
  <pre><code>    &lt;ImageView
              android:layout_height="100dp"
              android:layout_width="100dp"
              tools:srcCompat="@drawable/favorite"
              app:iconImage="@{myModel.cool}"
              app:imageRotation="@{myModel.stars}"
              android:id="@+id/imageView" app:layout_constraintEnd_toEndOf="parent" android:layout_marginEnd="8dp"
              android:layout_marginBottom="8dp"
              app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent"
              android:layout_marginStart="8dp"
              android:layout_marginTop="8dp" app:layout_constraintTop_toBottomOf="@+id/ratingBar"/&gt;
  </code></pre>
  
  <p>I already tried changing the parameter type of the 'cool' parameter to ObservableBoolean but to no avail.</p>