AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.

体验最新版AndroidStudio3.0 Canary 8的时候,发现之前项目的butter knife报错,用到注解的应该都会报错
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
  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 } }
    }
    ...
}

记住一点:改完了之后,别忘了继续sync Now.而不是:刷新按钮,别忘了

参考:AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.

原文地址:https://www.cnblogs.com/aspirant/p/8335616.html

时间: 2024-10-10 08:41:24

AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.的相关文章

AS使用lombok注解报错:Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.

Rebuild时报错信息如下所示: 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 th

Android Studio错误日志-注解报错Annotation processors must be explicitly declared now.

导入项目时,发现之前项目的butter knife报错,用到注解的应该都会报错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.

WebService之CXF注解报错(一)

WebService之CXF注解 1.具体报错如下 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } 2014-5-4 22:42:12 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native li

运用servlet3.0注解报404错误

我的环境是eclipse (查了一下2013EEIDE)+tomcat7.0+Servlet3.0 项目名称:day08BookManageCase servlet类是new servlet出来的如下代码,大部分代码省略,只留了注解部分. /** * Servlet implementation class FindAllServlet */ @WebServlet("/FindAllServlet") public class FindAllServlet extends HttpS

CentOS7.0开机报错“piix4_smbus”和“dev fd0”的解决办法

系统:CentOS 7.0 X64 报错现象: 此问题包含了两个错误: 错误1: piix4_smbus host smbus controller not enabled 修改办法: [[email protected] ~]# lsmod | grep i2c i2c_piix4              22106  0  i2c_core               40325  2 drm,i2c_piix4 [[email protected] ~]# vi /etc/modprob

SQL Developer 4.0 启动报错“unable to create an instance of the java virtual machine located at path”

安装了Oracle之后,第一件事情就是想想怎么去连接,进而操作.SQL Developer是官方提供的强大工具,个人看来也是第一选择. 目前官网提供的最新版是4.0.1.14.48,下载下来之后,就跃跃欲试了.将下载下来的包解压,直接运行sqldeveloper.exe这个文件,选择了本地安装的JDK路径,之后却不幸的报错了,提示"unable to create an instance of the java virtual machine located at path",具体界面

WebService之CXF注解报错(二)

WebService之CXF注解 1.具体报错如下 五月 04, 2014 11:24:12 下午 org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromClass 信息: Creating Service {http://service.you.com/}IServiceService from class com.you.service.IService 五月 04, 2014 11:

WebService之CXF注解报错(三)

如果你对项目管理.系统架构有兴趣,请加微信订阅号"softjg",加入这个PM.架构师的大家庭 要成为WEB架构师,首先要找到通往成功的正确方向,接下来我们就要往这个方向努力.然而如唐僧去西天取经一样,要历经种种磨难,一路上打败各种妖魔鬼怪才能继续前行,所以唐僧取经,第一件事,就是招徒弟,遇见妖魔鬼怪就让技术高超的徒弟打败它,徒弟不听话就念紧箍咒,徒弟也搞不定的妖怪,就请观音菩萨搞定,这就是唐僧成功的法宝,没法宝上路,看来我们会死的比较惨啊,哈哈. 我们在通往架构师的路上,同样会遇到各

RedHat5.5_X64 Linux安装oracle 11.2.0.3 报错

REDHAT linux 安装 11G  11.2.0.3   报错 oracle用户执行./runinstaller后 直接报错 查看日志后 [[email protected] OraInstall2012-06-29_12-08-50AM]# more installActions2012-06-29_12-08-50AM.log  SEVERE: [FATAL] HXZG: HXZG. Refer associated stacktrace #oracle.install.commons