Android Studio 1.1.0 配置androidannotations框架
2015-06-29 15:33
477 查看
环境:Android Studio 1.1.0 、JDK8、Win7-x64
大致分为五步吧
进入build.gradle(Project: **)里添加classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.4’,位置如下图:
进入build.gradle(Module: **)里添加apt插件
apply plugin: ‘android-apt’
进入build.gradle(Module: **)里添加apt相关设置
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
//androidManifestFile variant.processResources.manifestFile
resourcePackageName “com.yehlu.demo”//此处填写你自己的包名
}
}
进入build.gradle(Module: **)里添加相关依赖包
dependencies {
apt “org.androidannotations:androidannotations:3.2”
compile fileTree(dir: ‘libs’, include: [‘*.jar’])
compile ‘com.android.support:appcompat-v7:22.0.0’
compile “org.androidannotations:androidannotations-api:3.2”
}
最后同步一下gradle,gradle不要设置离线模式
最后的文件内容是这样的
build.gradle(Project: **)
build.gradle(Module: **)
相关文章推荐
- android 画画板
- android studio安装须知
- How to distribute your own Android library through jCenter and Maven Central from Android Studio
- Android学习 15 ->意图Intent
- AndroidStudio自动填充
- Android添加权限大讲解
- Android软键盘强制弹出,隐藏输入法.
- Android学习历程
- pay---Android 银行卡快捷支付
- Android各种屏幕分辨率(VGA、HVGA、QVGA、WQVGA、WVGA、FWVGA) 详解
- Android异常
- Android消息推送
- android 关于将应用添加到系统的 分享.. 或者 发送到.. 中
- Android初学笔记——xml文件的读写
- android中跨进程通讯的4种方式
- 【MIG专项测试组】如何准确评测Android应用的流畅度?
- Android - Designtime Layout Attributes & Tools Attributes
- Android注册native函数和jave方法的对应关系
- Android——LinearLayout按下(state_pressed)或获取焦点时(state_focused)背景设置不同颜色或图片
- Android类动态加载技术