Annotation processors must be explicitly declared now. butterknife-7.0.1.jar

升级as3.0   gradle4.1之后就报这个错了    原因是新版本的注解要显示表注





android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true

这个解决方案官方不推荐


按照官方推荐方法:应该是在报错的build.gradle中修改:

 dependencies {
     compile xxxxx
  
     //加上类似这些对于注解处理器的的依赖
     annotationProcessor 'com.xxxx.xxxxx-1.0.0'
记住:在需要注解的地方都要加上这个,在gradle里面

你可能感兴趣的:(android)