設定Eclipse

Please note that there are two important JARs in AndroidAnnotations:

androidannotations-X.X.X-api.jar 要加入至專案的Lib

androidannotations-X.X.X.jar只有在編譯APK的時候才會用到

步驟

androidannotations-X.X.X-api.jar放置libs資料夾

androidannotations-X.X.X.jar 放置不同的資料夾,不用放在libs裡面

在專案上點擊右鍵 > "Properties"

點擊Java Compiler ,JDK要在1.6以上

Java Compiler > Annotation Processing 選擇 Enable annotation processing

Java Compiler > Annotation Processing > Factory Path and add the processor JAR : androidannotations-X.X.X.jar.

確定專案有重建

Java Build Path > Libraries and add the API JAR : androidannotations-X.X.X-api.jar

開始使用AndroidAnnotations