Android Studio3.0 Annotation processors must be explicitly declared now

報(bào)錯(cuò)

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Android 自定義View的各種姿勢1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 179,063評(píng)論 25 709
  • 體驗(yàn)最新版AndroidStudio3.0 的時(shí)候,發(fā)現(xiàn)之前項(xiàng)目的butter knife報(bào)錯(cuò),用到注解的應(yīng)該都會(huì)...
    BBNO閱讀 3,145評(píng)論 0 1
  • 剛剛讀一篇文章,看到一個(gè)有趣的故事。說的是巴菲特與大學(xué)生們玩了一個(gè)叫“買賣人口”的游戲,也不知是真是假,在這只當(dāng)故...
    我是南慕閱讀 5,118評(píng)論 3 6
  • 公司給了員工福利,兩年一次的旅游,由于人數(shù)眾多,所以都是隨機(jī)排列組合組成的出行隊(duì)伍。不少同事帶了小朋友,算是陪家人...
    珊珊如玉閱讀 517評(píng)論 0 1
  • 在蒼山洱海之濱 遇見一個(gè)溫暖的人 如山間清爽的風(fēng) 如冬日古城溫暖的陽光 從陌生到相識(shí) 從相識(shí)到了解 從了解到熟悉 ...
    離離青青草閱讀 485評(píng)論 2 3

友情鏈接更多精彩內(nèi)容