Android(安卓)Studio 1.5 配置AndroidAnnotations
16lz
2021-01-26
在项目中添加Android Annotions注解(基于Gradle)
1. 在build.gradle(project下)中添加对apt的依赖
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
2.在build.gradle(当前模块中)应用apt依赖,并定义AA版本
//在当前module中使用apt插件apply plugin: 'com.neenbedankt.android-apt'//定义变量(AA版本)def AAVersion = '3.3.2'
3.定义对androidannotations.jar的依赖, 并交给apt插件
//定义对androidannotations.jar的依赖, 并交给apt插件apt "org.androidannotations:androidannotations:$AAVersion"//定义对android-api.jar的依赖, 将编译打包到apk中compile "org.androidannotations:androidannotations-api:$AAVersion"apt { arguments { androidManifestFile variant .outputs[0].processResources.manifestFile }}
注意:
- 请保持网络畅通
- androidannotions地址: https://github.com/excilys/androidannotations
更多相关文章
- 【Gradle】Android(安卓)Gradle 高级自定义
- AcitonBar自定义布局
- Android之 自定义属性 的使用
- android中的AIDL学习笔记
- Android(安卓)自定义标题栏
- Android(安卓)Studio安装并使用Kotlin插件
- 关于android多分辨率中的density和density-independent pixel的
- 在Android中实现RN的自定义Native Modeule
- android gallery 自定义边框+幻灯片效果