报错!

Error:Execution failed for task ':app:javaPreCompileDebug'.
> 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.
    - butterknife-6.0.0.jar (com.jakewharton:butterknife:6.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 https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.

切换为Project,打开app->build.gradle中
android {
    ...
    defaultConfig {
        ...

       ( 在defaultConfig中添加如下代码 :)

javaCompileOptions { 
    annotationProcessorOptions { 
        includeCompileClasspath = true 
    } 
}

    }
    ...

}


例如: 

Android Studio3.0 Error:Execution failed for task ':app:javaPreCompileDebug'

相关文章:

  • 2022-01-08
  • 2022-12-23
  • 2021-07-30
  • 2021-11-27
  • 2021-12-06
  • 2021-10-07
  • 2021-12-16
猜你喜欢
  • 2021-07-10
  • 2021-06-25
  • 2021-07-05
  • 2021-10-15
  • 2021-10-13
  • 2021-11-19
相关资源
相似解决方案