Android Studio 中配置 AndroidAnnotations 非常方便,只需要分别在项目Gradle和Module的Gradle中添加一些配置,然后重新编译,Android Studio 会自行下载 AndroidAnnotations,之后即可直接使用。
配置项目的Gradle
-

-
配置项目的build.gradle
在build.gradle中添加上图中的语句即可。
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
// replace with the current version of the android-apt plugin
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
配置Module的Gradle
-
查看最新的 android annotations 版本

本文详细介绍了如何在Android Studio中配置AndroidAnnotations,包括在项目和Module的Gradle文件中添加必要配置,同步项目,以及如何利用AndroidAnnotations进行便捷的开发,如组件绑定、依赖注入、事件绑定等。
最低0.47元/天 解锁文章
236

被折叠的 条评论
为什么被折叠?



