android studio gradle编译时的jar冲突错误
Android Studio gradle编译时出现如下错误:
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-7.0.1.jar (butterknife-7.0.1.jar)
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.gradle中
defaultConfig{
.........
添加如下代码:
javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true }
}
更多相关文章
- Android做了些什么?
- MIPS android 编译总结
- gradle 配置文件 build.gradle 属性详解
- Android(安卓)驱动开发文章收录
- andriod item内checked的setOnClickListener事件和setOnItemClic
- android圆形进度条ProgressBar颜色设置
- Android编译过程详解(一)
- Android(安卓)service
- Android(安卓)SDK Manager 报错:Connection to https://dl-ssl.go