title: Databinding Error: old values should be followed by new values. Parameter 2 must be the same type as parameter 3
body: <p>I am using data binding for my custom fields. I have set a custom data binding adapter for this.</p>
  
  <p>My Binding Adapter looks like this:</p>
  
  <pre><code>@BindingAdapter({"created_by,created_at"})
  public static void setDetailCreated(TextView textView, String createdBy, long createdAt) {
      Calendar cal = Calendar.getInstance();
      cal.setTimeInMillis(createdAt);
  
      SimpleDateFormat dateFormat = new SimpleDateFormat("h:mm a, dd MMM yyyy");
  
      String format = textView.getContext().getString(R.string.details_created, createdBy,
              dateFormat.format(cal.getTime()));
  
      textView.setText(format);
  }
  </code></pre>
  
  <p>And in my layout file I have:</p>
  
  <pre><code> ...
   &lt;data&gt;
  
      &lt;import type="java.util.Map" /&gt;
  
      &lt;import type="com.example.beans.Friend" /&gt;
  
      &lt;variable
          name="user"
          type="com.example.beans.User" /&gt;
  
      &lt;variable
          name="friends"
          type="Map&amp;lt;String, Friend&amp;gt;" /&gt;
  
   &lt;/data&gt;
  
   ....
   ....
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          app:created_by="@{friends[user.createdBy].name}"
          app:created_at="@{user.createdAt}" /&gt;
  </code></pre>
  
  <p>But while running I am getting the below error:</p>
  
  <blockquote>
    <p>Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
    java.lang.RuntimeException: failure, see logs for details.
      BindingAdapter setDetailCreated(android.widget.TextView,java.lang.String,long): old values should be followed by new values. Parameter 2 must be the same type as parameter 3.</p>
  </blockquote>
  
  <p>I don't understand what is going wrong here?</p>