1.project 下的build.grade 添加:
// annotations
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
2.app下的build.grade 添加:
apply plugin: 'com.neenbedankt.android-apt'
def AAVersion = '4.0.0'
3.dependencies 里添加:
// 注释框架
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
apt "org.androidannotations:roboguice:$AAVersion"
compile "org.androidannotations:roboguice-api:$AAVersion"
compile 'org.roboguice:roboguice:3.0.1'