Android(安卓)Studio3.0 Error:Execution failed for task ':app:javaPreCompileDebug' 错误
16lz
2021-12-04
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.
> 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.
在app的build中
android {
...
defaultConfig {
...
//添加如下配置就OK了
javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
}
...
}
更多相关文章
- Android(安卓)Studio App LinearLayout多层布局嵌套
- android 报错Attempt to invoke virtual method
- Android(安卓)- 自定义标题栏(TitleBar)
- Cocos2d-x & NDK
- Android(安卓)Setting中添加解除屏幕锁选项
- Android(安卓)获取闹钟引发的血案
- Android(安卓)CTS 测试总结
- Android中添加布局和初始化布局总结
- Android(安卓)SystemUI状态栏添加图标