AndroidFine Error:Annotation processors must be explicitly declared now.

mac2022-06-30  19

环境

Android Studio 3.0 Gradle 3.0.0 gradle 4.1

Error

Error:Execution failed for task ':app:javaPreCompileAnzhiDebug'. > 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-7.0.1.jar (com.jakewharton:butterknife:7.0.1) 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.

解决

javaCompileOptions { // 显式声明支持注解 annotationProcessorOptions { includeCompileClasspath false } }

转载于:https://www.cnblogs.com/Jeely/p/11315090.html

最新回复(0)