title: Adding buildFeatures { viewBinding true } results in "Cannot find a setter for <... android:visibility> that accepts parameter type 'int'
body: <p>I want to start using <code>viewBinding</code> in <a href="https://github.com/mycelium-com/wallet-android" rel="noreferrer">our project</a> but the mere addition of the configuration results in a compile error:</p>
  <pre><code>android {
      buildFeatures {
          dataBinding true
          viewBinding true // new line and only change
      }
  </code></pre>
  <p>results in:</p>
  <pre><code>e: /home/leo/StudioProjects/android-wallet/mbw/build/generated/source/kapt/btctestnetDebug/com/mycelium/wallet/DataBinderMapperImpl.java:37: error: cannot find symbol
  import com.mycelium.wallet.databinding.FragmentBequantAccountBindingImpl;
                                        ^
    symbol:   class FragmentBequantAccountBindingImpl
    location: package com.mycelium.wallet.databinding
  
  
  
  
  Cannot find a setter for &lt;com.mycelium.wallet.databinding.ItemBequantSearchBinding app:visibility&gt; that accepts parameter type 'int'
  
  If a binding adapter provides the setter, check that the adapter is annotated correctly and that the parameter type matches.
  </code></pre>
  <p>The offending code is:</p>
  <pre><code>    &lt;data&gt;
  
          &lt;import type=&quot;android.view.View&quot; /&gt;
  
          &lt;variable
              name=&quot;viewModel&quot;
              type=&quot;com.mycelium.bequant.market.viewmodel.AccountViewModel&quot; /&gt;
      &lt;/data&gt;
  ...
  &lt;include
      android:id=&quot;@+id/searchBar&quot;
      layout=&quot;@layout/item_bequant_search&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:visibility=&quot;@{viewModel.searchMode ? View.VISIBLE : View.GONE}&quot; removing=&quot;this line fixes compilation&quot;
      app:layout_constraintTop_toBottomOf=&quot;@id/hideZeroBalance&quot; /&gt;
  </code></pre>
  <p>Changing the offending line to any of</p>
  <pre><code>android:visibility=&quot;@{viewModel.searchMode ? `visible` : `gone`}&quot;
  app:visibility=&quot;@{viewModel.searchMode ? View.VISIBLE : View.GONE}&quot;
  </code></pre>
  <p>results in similar errors.</p>
  <p>I read I might have to define a <code>BindingAdapter</code> but why and where?</p>
  <p>I tried adding</p>
  <pre><code>
      @BindingAdapter(&quot;visibility&quot;)
      fun setVisibility(target: View, visible: Boolean) {
          target.visibility = if (visible) View.VISIBLE else View.GONE
      }
  </code></pre>
  <p>to AccountFragment which inflates above xml file changing the xml to</p>
  <pre><code>android:visibility=&quot;@{viewModel.searchMode}&quot;
  </code></pre>
  <p>but this appears to have no effect.</p>
  <p>Both <code>fragment_bequant_account.xml</code> and <code>item_bequant_search.xml</code> <a href="https://stackoverflow.com/a/55571785/969478">use <code>androidx.constraintlayout.widget.ConstraintLayout</code> instead of <code>androidx.constraintlayout.ConstraintLayout</code></a>.</p>
  <p>I tried to put a <code>@BindingAdapter</code> into the <code>AccountViewModel</code> <a href="https://stackoverflow.com/questions/64673518/how-can-i-binding-different-value-for-androidlayout-marginleft-based-livedatab#comment114585528_64679628">as suggested here</a> but with no success.</p>