title: Annotation processors must be explicitly declared now. The following dependencies on the compile classpath?
body: <p>I am developing new app using android architecture components but I am getting the following error from gradle</p>
  
  <blockquote>
    <p>Annotation processors must be explicitly declared now.  The following dependencies on the compile classpath are found to contain annotation processor.  Please add them to the annotationProcessor configuration.
      - lifecycle-compiler-2.0.0.jar (androidx.lifecycle:lifecycle-compiler:2.0.0)
    Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior.  Note that this option is deprecated and will be removed in the future.
    See <a href="https://developer.android.com/r/tools/annotation-processor-error-message.html" rel="nofollow noreferrer">https://developer.android.com/r/tools/annotation-processor-error-message.html</a> for </p>
  </blockquote>
  
  <p>below is my app.gradle</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  apply plugin: 'kotlin-android'
  
  apply plugin: 'kotlin-android-extensions'
  
  android {
      compileSdkVersion 29
      buildToolsVersion "29.0.2"
      defaultConfig {
          applicationId "com.example.lifecycleawaredemo"
          minSdkVersion 15
          targetSdkVersion 29
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
      implementation 'androidx.appcompat:appcompat:1.0.2'
      implementation 'androidx.core:core-ktx:1.0.2'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.2.0'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
      implementation 'androidx.lifecycle:lifecycle-compiler:2.0.0'
  
      def lifecyle_version = "1.1.1"
      implementation "android.arch.lifecycle:extensions:$lifecyle_version"
      implementation "android.arch.lifecycle:compiler:$lifecyle_version"
  }
  </code></pre>
  
  <p>below my build.gradle</p>
  
  <pre><code>buildscript {
      ext.kotlin_version = '1.3.31'
      repositories {
          google()
          jcenter()
  
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.4.2'
          classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
          maven { url 'https://maven.google.com' }
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>