使用Butterknife框架時,遇到java.lang.ClassNotFoundException,註解沒有反應,發現是因爲沒有配置插入式註解使用的Jar包。
按照教程配置發現,在JavaCompiler下根本找不到 Annotation Processing 選項。
Android點滴-ADT 23.0.2找不到Annotation Processing選項,然後發現是缺少了 Eclipse的 JDT 插件(Java development tools),安裝上這個插件就OK了!
安裝步驟:
1. Help –> Install New Software…
2. 按照下圖,在 Work with 中選擇Juno - http://download.eclipse.org/releases/juno
3. 在下面的 Name 中選擇 Programming Languages 下的 Eclipse Java Development Tools package
4.然後next –> finish 安裝,完成之後,就可以配置了。
Butterknife官網
http://jakewharton.github.io/butterknife/
Butterknife配置說明
http://jakewharton.github.io/butterknife/ide-eclipse.html