使用androidstudio3.0时butterknife报错解决方法
2017-11-14 09:45
351 查看
今天升级了androidstudio3.0,因为以前项目用了注解butterknife:7.0.1,所以出现了如下的报错:
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 (com.jakewharton: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.
解决方法如下:
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 (com.jakewharton: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.
解决方法如下:
在app的build中 android { defaultConfig { //添加如下配置就OK了 javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } } } }
相关文章推荐
- 使用butterknife bind之后依然运行报空指针问题解决方法
- android studio使用ButterKnife 8.0.1报空指针错误以及点击事件无效的解决方法
- 使用butterknife中遇到的几个问题及解决方法
- androidstudio3.0使用butterknife报错解决的解决方法
- android studio使用ButterKnife 8.0.1报空指针错误以及点击事件无效的解决方法
- butterknife8.4空指针异常的解决方法及使用详解
- 【Bug】android Studio使用butterknife报错的解决方法
- 在RxRichEdit中插入图片的完美解决方法(不使用剪贴板)
- 使用jdbc调用oracle b294 存储过程(返回cursor)的错误及解决方法- -
- 关于使用VS.Net2003调试器出现的问题及相关解决方法
- 第一次使用jdbc连接postgre数据库碰到的问题及解决方法
- asp.net报表解决方法(第一次使用cnblogs的blog)
- WinXP SP2 IE不能使用cookie的解决方法
- Jbuilder2006中使用1.5以下JDK的解决方法 [转]
- 编写asp.net登录界面时,在不会使用cookie的情况下,暂时解决方法.
- 引用天下会"使用OleDbCommandBuilder时出现“Insert into 语句的语法错误”的解决方法"
- 使用OleDbCommandBuilder时出现“Insert into 语句的语法错误”的解决方法
- 使用VC时出现error spawning cl.exe解决方法
- Java使用Oracle遇到的最大游标超出问题及其解决方法
- 使用Apache Axis部署 Web服务时的常见问题及其解决方法(转)