title: Cannot find the getter for attribute ImageView while using Databinding in kotlin
body: <p>I am trying to learn <strong>data binding</strong> with <strong>Kotlin</strong> and I was able to implement it successfully for edit text and text views. After that I am trying to use it for Image Views. I am currently trying to give an option to users to choose their profile picture by clicking on the imageview. This code works properly but when I try to set the image to the view using data binding adapter , I get the following error.</p>
  
  <blockquote>
    <p>Found data binding errors.
    ****/ data binding error ****msg:Cannot find the getter for attribute 'android:userImage' with value type java.lang.String on de.hdodenhof.circleimageview.CircleImageView. file:/home/parangat-pt-p10/AndroidStudioProjects/ReUsableAndroid/reusable_android/app/src/main/res/layout/activity_signup.xml loc:25:12 - 31:48 ****\ data binding error ****</p>
  </blockquote>
  
  <p>Below is my code for the same.</p>
  
  <p><strong>Layout code of ImageView</strong></p>
  
  <pre><code>&lt;de.hdodenhof.circleimageview.CircleImageView
              android:layout_width="100dp"
              android:layout_height="100dp"
              android:layout_gravity="center_horizontal"
              android:userImage="@{signup.userImage}"
              android:id="@+id/iv_user"
              android:src="@drawable/profile"/&gt;
  </code></pre>
  
  <p><strong>Model class code</strong></p>
  
  <pre><code>    class Signup {
      var userImage=""
      var firstName=""
      var lastName=""
      var phoneNumber=""
      var postCode=""
      var country=""
      var email=""
      var password=""
      var confirmPassword=""
      var isAcceptTerms=false
  
      @BindingAdapter("android:userImage")
      fun loadImage(view: CircleImageView, imageUrl: String) {
          userImage=imageUrl
          Glide.with(view.context).load(imageUrl).into(view)
  
      }
  }
  </code></pre>
  
  <p>And this is what I am doing after user selected image </p>
  
  <pre><code>override fun onSingleImageSelected(uri: Uri?) {
      signupBinding.signup?.loadImage(iv_user,uri.toString())
  
  }
  </code></pre>
  
  <p>Since this is written in kotlin, therefore there is no need to define the getter and setter methods but the error states that no getter method found.</p>
  
  <p>As suggested by Enzokie, I created the binding Adapter in separate file like below</p>
  
  <pre><code>@BindingAdapter("userImage")
  fun loadImage(view: CircleImageView, imageUrl: String) {
      Glide.with(view.context).load(imageUrl).into(view)
  }
  </code></pre>
  
  <p>But I still have the same issue.</p>