title: error: cannot find symbol import android.widget.selector;
body: <p>My Android Studio Build fails with this error message, after updating several dependencies. I also switched from using &quot;dataBinding{
  enabled = true
  }&quot;
  to &quot;viewBinding true&quot; I can't find a resolution for this anywhere. I already tried cleaning, rebuilding, invalidating caches and restarting the computer multiple times. Previous suggestions to similar questions didn't resolve this either. Do i have to start a new android studio project and copy over my code?</p>
  <blockquote>
  <p>C:\Users\seric\AndroidStudioProjects\Futlytics\app\build\generated\data_binding_base_class_source_out\debug\out\com\futlytics\databinding\ToggleStyleBinding.java:7: error: cannot find symbol
  import android.widget.selector;</p>
  </blockquote>
  <p>I dont even use anything called ToggleStyleBinding.</p>
  <p>My gradle files look like this:</p>
  <p><strong>Module</strong></p>
  <pre><code>    apply plugin: 'com.android.application'
      apply plugin: 'kotlin-android'
      //apply plugin: 'kotlin-android-extensions'
      apply plugin: &quot;androidx.navigation.safeargs.kotlin&quot;
      apply plugin: 'com.google.gms.google-services'
      
      android {
          compileSdkVersion 30
          buildToolsVersion &quot;30.0.0&quot;
      
          defaultConfig {
              applicationId &quot;com.futlytics&quot;
              minSdkVersion 22
              targetSdkVersion 30
              versionCode 1
              versionName &quot;1.0&quot;
      
              testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
          }
      
          buildTypes {
              release {
                  minifyEnabled false
                  proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
              }
          }
          compileOptions {
              sourceCompatibility JavaVersion.VERSION_1_8
              targetCompatibility JavaVersion.VERSION_1_8
          }
          kotlinOptions {
              jvmTarget = '1.8'
          }
          /*dataBinding{
              enabled = true
          }*/
          buildFeatures {
              mlModelBinding true
              viewBinding true
          }
      
      
      }
      
      dependencies {
          implementation fileTree(dir: &quot;libs&quot;, include: [&quot;*.jar&quot;])
          implementation &quot;org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version&quot;
          implementation 'androidx.core:core-ktx:1.3.2'
          implementation 'androidx.appcompat:appcompat:1.2.0'
          implementation 'com.google.android.material:material:1.3.0'
          implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
          //implementation 'androidx.navigation:navigation-fragment:2.3.4'
          //implementation 'androidx.navigation:navigation-ui:2.3.4'
          implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
          implementation 'androidx.navigation:navigation-fragment-ktx:2.3.4'
          implementation 'androidx.navigation:navigation-ui-ktx:2.3.4'
          implementation 'org.tensorflow:tensorflow-lite-support:0.1.0-rc1'
          implementation 'org.tensorflow:tensorflow-lite-metadata:0.1.0-rc1'
          implementation 'org.tensorflow:tensorflow-lite-gpu:2.2.0'
          implementation 'com.google.firebase:firebase-auth:20.0.3'
          implementation 'com.google.android.gms:play-services-auth:19.0.0'
      
          testImplementation 'junit:junit:4.13.2'
          androidTestImplementation 'androidx.test.ext:junit:1.1.2'
          androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
          implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
          implementation 'com.google.android.gms:play-services-vision:20.1.3'
          implementation 'com.google.android.gms:play-services-mlkit-text-recognition:16.1.3'
          implementation 'androidx.preference:preference-ktx:1.1.1'
      
          // CameraX
          implementation &quot;androidx.camera:camera-camera2:1.1.0-alpha03&quot;
          implementation &quot;androidx.camera:camera-lifecycle:1.1.0-alpha03&quot;
          implementation &quot;androidx.camera:camera-view:1.0.0-alpha23&quot;
      
          //Firebase
          implementation platform('com.google.firebase:firebase-bom:26.7.0')
          implementation 'com.google.firebase:firebase-analytics-ktx'
          implementation 'com.google.firebase:firebase-firestore-ktx'
          implementation 'com.google.firebase:firebase-auth-ktx:20.0.3'
      
      
      }
  
  Projectapply plugin: 'com.android.application'
  apply plugin: 'kotlin-android'
  //apply plugin: 'kotlin-android-extensions'
  apply plugin: &quot;androidx.navigation.safeargs.kotlin&quot;
  apply plugin: 'com.google.gms.google-services'
  
  android {
      compileSdkVersion 30
      buildToolsVersion &quot;30.0.0&quot;
  
      defaultConfig {
          applicationId &quot;com.futlytics&quot;
          minSdkVersion 22
          targetSdkVersion 30
          versionCode 1
          versionName &quot;1.0&quot;
  
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
      kotlinOptions {
          jvmTarget = '1.8'
      }
      /*dataBinding{
          enabled = true
      }*/
      buildFeatures {
          mlModelBinding true
          viewBinding true
      }
  
  
  }
  
  dependencies {
      implementation fileTree(dir: &quot;libs&quot;, include: [&quot;*.jar&quot;])
      implementation &quot;org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version&quot;
      implementation 'androidx.core:core-ktx:1.3.2'
      implementation 'androidx.appcompat:appcompat:1.2.0'
      implementation 'com.google.android.material:material:1.3.0'
      implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
      //implementation 'androidx.navigation:navigation-fragment:2.3.4'
      //implementation 'androidx.navigation:navigation-ui:2.3.4'
      implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
      implementation 'androidx.navigation:navigation-fragment-ktx:2.3.4'
      implementation 'androidx.navigation:navigation-ui-ktx:2.3.4'
      implementation 'org.tensorflow:tensorflow-lite-support:0.1.0-rc1'
      implementation 'org.tensorflow:tensorflow-lite-metadata:0.1.0-rc1'
      implementation 'org.tensorflow:tensorflow-lite-gpu:2.2.0'
      implementation 'com.google.firebase:firebase-auth:20.0.3'
      implementation 'com.google.android.gms:play-services-auth:19.0.0'
  
      testImplementation 'junit:junit:4.13.2'
      androidTestImplementation 'androidx.test.ext:junit:1.1.2'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
      implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
      implementation 'com.google.android.gms:play-services-vision:20.1.3'
      implementation 'com.google.android.gms:play-services-mlkit-text-recognition:16.1.3'
      implementation 'androidx.preference:preference-ktx:1.1.1'
  
      // CameraX
      implementation &quot;androidx.camera:camera-camera2:1.1.0-alpha03&quot;
      implementation &quot;androidx.camera:camera-lifecycle:1.1.0-alpha03&quot;
      implementation &quot;androidx.camera:camera-view:1.0.0-alpha23&quot;
  
      //Firebase
      implementation platform('com.google.firebase:firebase-bom:26.7.0')
      implementation 'com.google.firebase:firebase-analytics-ktx'
      implementation 'com.google.firebase:firebase-firestore-ktx'
      implementation 'com.google.firebase:firebase-auth-ktx:20.0.3'
  
  
  }
  </code></pre>
  <p><strong>Project</strong></p>
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  buildscript {
      ext.kotlin_version = &quot;1.4.31&quot;
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:4.1.3'
          classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;
          classpath &quot;androidx.navigation:navigation-safe-args-gradle-plugin:2.3.4&quot;
          classpath 'com.google.gms:google-services:4.3.5'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
          maven { url 'https://jitpack.io' }
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>