title: DataBinding issues after updating to AndroidX?
body: <p>I'm using databinding in my project. But after updating all the dependencies, it shows the below error.</p>
  
  <blockquote>
    <p>error: cannot find symbol class AddCrop</p>
  </blockquote>
  
  <p>I tried cleaning the project, Invalidating cache &amp; Restart, Renaming the layout files.</p>
  
  <p>I'm using this library for Data Binding. I have seen a Similar Issue in this library too > <a href="https://github.com/evant/binding-collection-adapter/issues/131" rel="noreferrer">https://github.com/evant/binding-collection-adapter/issues/131</a></p>
  
  <p>Please help me to solve this issue ?</p>
  
  <p><a href="https://i.stack.imgur.com/kGZYR.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/kGZYR.jpg" alt="enter image description here"></a></p>
  
  <p><strong>build.gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'com.jakewharton.hugo'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.puramtech.myfarmer"
          minSdkVersion 21
          targetSdkVersion 28
          versionCode 7
          versionName "1.1"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro_placeholder'
          }
      }
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
      dataBinding {
          enabled = true
      }
      lintOptions {
          disable 'MissingTranslation'
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
  
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
      implementation 'androidx.media:media:1.1.0-alpha01'
      implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0-alpha01'
      implementation 'androidx.preference:preference:1.1.0-alpha02'
      implementation 'com.google.android.material:material:1.1.0-alpha02'
      implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha01'
      implementation 'androidx.cardview:cardview:1.0.0'
      implementation 'io.nlopez.smartlocation:library:3.3.3'
      implementation 'com.akexorcist:localizationactivity:1.2.1'
  
  //    Arch Components
      implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
  
      implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
      implementation "com.squareup.retrofit2:retrofit:2.5.0"
      implementation "com.squareup.retrofit2:converter-gson:2.5.0"
      implementation 'com.github.Ilhasoft:data-binding-validator:2.0.0'
  
      implementation 'com.zhihu.android:matisse:0.4.3'
      implementation 'ch.acra:acra-core:5.1.1'
      implementation 'ch.acra:acra-http:5.1.1'
      implementation 'com.github.bumptech.glide:glide:4.8.0'
      annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
      implementation 'id.zelory:compressor:2.1.0'
      implementation 'com.stephentuso:welcome:1.4.1'
      implementation 'com.github.jd-alexander:LikeButton:0.2.3'
      implementation 'com.github.lawloretienne:imagegallery:0.1.0'
      implementation 'com.google.android.gms:play-services-auth-api-phone:16.0.0'
      implementation 'com.google.android.gms:play-services-location:16.0.0'
  
      implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:3.0.0-beta3'
      implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:3.0.0-beta3'
  
  }
  </code></pre>
  
  <p><strong>ACTIVITY</strong></p>
  
  <pre><code>public class AddCropActivity extends BaseActivity {
  
      ActivityAddcroppBinding binding;
      AddCropViewModel mViewModel;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          binding = DataBindingUtil.setContentView(this, R.layout.activity_addcropp);
          AddCropViewModelFactory factory = InjectorUtils.provideAddCropViewModelFactory(this.getApplicationContext(), mSelected);
          mViewModel = ViewModelProviders.of(this, factory).get(AddCropViewModel.class);
          binding.setViewModel(mViewModel);
          binding.setActivity(this);
  
          validator = new Validator(binding);
  
          permissionHelper = new PermissionHelper(this);
  
          isEDIT = getIntent().getStringExtra("ACTION").equalsIgnoreCase("EDIT");
  
          initToolbar();
  
  
          mViewModel.getCroptype(
                  Utils.getLang(getCurrentLanguage().getISO3Language())).observe(AddCropActivity.this, apiResponse -&gt; {
              if (apiResponse != null &amp;&amp; isEDIT) {
                  if (apiResponse.getError() == null) {
                      List&lt;CropType&gt; crops = (List&lt;CropType&gt;) apiResponse.getList();
                      for (int i = 0; i &lt; apiResponse.getList().size(); i++) {
                          if (crops.get(i).getCropType().equalsIgnoreCase(cropType)) {
                              pos = i;
                          }
                      }
                  }
              }
  
          });
  
          binding.executePendingBindings();
  
          binding.progressBar.hide();
  
          mViewModel.getImageCount().observe(this, integer -&gt; {
              count = (integer != null ? integer : 0);
              binding.attachImages.setText("ATTACH IMAGES (" + count + ")");
  
              if(count == 0)
                  binding.attachImages.setEnabled(false);
              else
                  binding.attachImages.setEnabled(true);
  
          });
      }
  
  
      private void initToolbar() {
          final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
          final ActionBar actionBar = getSupportActionBar();
  
          if (actionBar != null) {
              actionBar.setTitle(isEDIT ? "Edit Crops" : "Add Crops");
              actionBar.setDisplayHomeAsUpEnabled(true);
              actionBar.setDisplayShowHomeEnabled(true);
          }
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          switch (item.getItemId()) {
              case android.R.id.home:
                  onBackPressed();
                  return true;
          }
          return super.onOptionsItemSelected(item);
      }
  
      @Override
      public void onBackPressed() {
          super.onBackPressed();
          finish();
      }
  
  }
  </code></pre>
  
  <p><strong>LAYOUT</strong></p>
  
  
  
  <p></p>
  
  <pre><code>&lt;data&gt;
  
      &lt;import type="com.puramtech.myfarmer.R" /&gt;
  
      &lt;variable
          name="viewModel"
          type="com.puramtech.myfarmer.ui.AddCrop.AddCropViewModel" /&gt;
  
      &lt;variable
          name="activity"
          type="com.puramtech.myfarmer.ui.AddCrop.AddCropActivity" /&gt;
  
  &lt;/data&gt;
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;include
          android:id="@+id/toolbar"
          layout="@layout/include_toolbar" /&gt;
  
      &lt;ScrollView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_below="@+id/toolbar"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_margin="14dp"
              android:orientation="vertical"&gt;
  
              &lt;Spinner
                  android:id="@+id/crop_type"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginBottom="8dp"
                  android:layout_marginEnd="24dp"
                  android:layout_marginStart="24dp"
                  android:layout_marginTop="8dp"
                  app:itemBinding="@{viewModel.singleItem}"
                  app:itemIds="@{viewModel.itemIds}"
                  app:items="@{viewModel.croptype}" /&gt;
  
              &lt;androidx.cardview.widget.CardView
                  android:id="@+id/image_card"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginBottom="14dp"
                  android:visibility="gone"&gt;
  
                  &lt;androidx.recyclerview.widget.RecyclerView
                      android:id="@+id/list"
                      android:layout_width="match_parent"
                      android:layout_height="100dp"
                      android:layout_gravity="center"
                      app:itemBinding="@{viewModel.editImageItem}"
                      app:items="@{viewModel.items}"
                      app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/&gt;
  
              &lt;/androidx.cardview.widget.CardView&gt;
  
              &lt;androidx.appcompat.widget.AppCompatButton
                  android:id="@+id/attach_images"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:layout_marginBottom="8dp"
                  android:layout_marginLeft="42dp"
                  android:layout_marginRight="42dp"
                  android:layout_marginTop="18dp"
                  android:background="@drawable/login_button"
                  android:onClick="@{()-&gt;activity.onImageAttach()}"
                  android:padding="12dp"
                  android:text="@string/attach_crop_images"
                  android:textColor="@color/white" /&gt;
  
          &lt;/LinearLayout&gt;
      &lt;/ScrollView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>