網上教程7.0大多數配置是這樣compile ‘com.jakewharton:butterknife:7.0.1' ,不知道他們用的Android Studio是多少版本,我用的3.0并沒有成功,報錯如下:
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: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.
解決辦法:加上 annotationProcessor ‘com.jakewharton:butterknife:7.0.1'即可解決
以上這篇解決Android Studio 3.0 butterknife:7.0.1配置的問題就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持VEVB武林網。
新聞熱點
疑難解答