title: Android Databinding Cannot find a setter for * that accepts parameter type *
body: <p>Am trying to declare a variable in databinding layout it's type is array of integer but I getting an error when building the project</p>
  <blockquote>
  <p>Cannot find a setter for &lt;android.widget.LinearLayout
  app:availableGradesIndexes&gt; that accepts parameter type 'int[]'</p>
  <p>If a binding adapter provides the setter, check that the adapter is
  annotated correctly and that the parameter type matches.</p>
  </blockquote>
  <p>the variable declaration in xml</p>
  <pre><code>&lt;variable
      name=&quot;availableGradesIndexes&quot;
      type=&quot;int[]&quot; /&gt;
  
  &lt;variable
      name=&quot;subject&quot;
      type=&quot;Subject&quot; /&gt;
  </code></pre>
  <p>the binding adapter</p>
  <pre><code>@BindingAdapter(&quot;availableGradesIndexes&quot;, &quot;subject&quot;)
  fun LinearLayout.bindGradeWithMarks(availableGradesIndexes: Array&lt;Int&gt;) {
      //....
  }
  </code></pre>
  <p>usage</p>
  <pre><code>&lt;LinearLayout
          android:layout_width=&quot;0dp&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:orientation=&quot;horizontal&quot;
          app:subjct=&quot;@{subject}&quot;
          app:availableGradesIndexes=&quot;@{availableGradesIndexes}&quot;
          tools:layout_height=&quot;@dimen/_40sdp&quot; /&gt;
  </code></pre>
  <p><strong>What else I Tried</strong></p>
  <p>tried to declare the type of binding adapter method to <code>IntArray</code> like <code>fun LinearLayout.bindGradeWithMarks(availableGradesIndexes: IntArray)</code></p>
  <p>also tried a <code>List&lt;Int&gt;</code> like <code>fun LinearLayout.bindGradeWithMarks(availableGradesIndexes: List&lt;Int&gt;)</code> and variable type <code>List&amp;lt;Int&amp;gt;</code></p>
  <p>also tried the binding variable type to be <code>Integer</code> and <code>Integer[]</code> and also <code>List&amp;lt;Integer&amp;gt;</code></p>
  <p><strong>so the question is how to bind a list or array of integer with binding adapter ?!</strong></p>