软件编程
位置:首页>> 软件编程>> Android编程>> 解决Android Studio 3.0 butterknife:7.0.1配置的问题

解决Android Studio 3.0 butterknife:7.0.1配置的问题

作者:jingjc  发布时间:2021-08-20 09:23:05 

标签:Android,Studio,3.0,butterknife:7.0.1,配置

网上教程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'即可解决

来源:http://blog.csdn.net/jingjc/article/details/78877065

0
投稿

猜你喜欢

手机版 软件编程 asp之家 www.aspxhome.com