您的位置:首页 > 移动开发 > Android开发

Android Annotations在studio上的配置

2016-12-14 13:32 246 查看
第一步



添加代码

apply plugin: 'android-apt'
def AAVersion = '3.3.2'




添加代码

apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"


apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName 'com.example.youfang.myapplication'
}
}


注意resourcePackageName后面添加的是你的包名。



第二步



添加代码

classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'




最后一步打开项目的AndroidManifest在MainActivity后面加“_”

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android