Android Studio3.0 Annotation processors must be explicitly declared now

报错

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.

源代码

    //butterknife
    compile 'com.jakewharton:butterknife:7.0.1'

修改后

    //butterknife
    compile 'com.jakewharton:butterknife:7.0.1'
    annotationProcessor 'com.jakewharton:butterknife:7.0.1'

参考stackoverflow

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 176,080评论 25 709
  • 体验最新版AndroidStudio3.0 的时候,发现之前项目的butter knife报错,用到注解的应该都会...
    BBNO阅读 8,227评论 0 1
  • 刚刚读一篇文章,看到一个有趣的故事。说的是巴菲特与大学生们玩了一个叫“买卖人口”的游戏,也不知是真是假,在这只当故...
    我是南慕阅读 10,450评论 3 6
  • 公司给了员工福利,两年一次的旅游,由于人数众多,所以都是随机排列组合组成的出行队伍。不少同事带了小朋友,算是陪家人...
    珊珊如玉阅读 3,258评论 0 1
  • 在苍山洱海之滨 遇见一个温暖的人 如山间清爽的风 如冬日古城温暖的阳光 从陌生到相识 从相识到了解 从了解到熟悉 ...
    离离青青草阅读 3,229评论 2 3

友情链接更多精彩内容