AndroidStudio 添加 AndroidAnnotations
1、添加对apt的依赖
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2+'
}
}
2、应用apt插件
apply plugin: 'android-apt'
3、配置apt的参数,将com.example.package.name替换成项目名称
apt {
arguments {
androidManifestFile variant.processResources.manifestFile
resourcePackageName "com.example.package.name"
}
}
4、添加对androidannotation的依赖
dependencies {
apt "org.androidannotations:androidannotations:3.0+" // add these
compile "org.androidannotations:androidannotations-api:3.0+" // two lines
compile 'com.android.support:appcompat-v7:+'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
5、完整版
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2+'
}
} apply plugin: 'android'
apply plugin: 'android-apt' android {
compileSdkVersion 19
buildToolsVersion "19.0.1" defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
} apt {
arguments {
androidManifestFile variant.processResources.manifestFile
resourcePackageName "com.example.package.name"
}
} dependencies {
apt "org.androidannotations:androidannotations:3.0+"
compile "org.androidannotations:androidannotations-api:3.0+"
compile 'com.android.support:appcompat-v7:+'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
来自 http://www.jayway.com/2014/02/21/androidannotations-setup-in-android-studio/
AndroidStudio 添加 AndroidAnnotations的更多相关文章
- 【AndroidStudio-添加RecyclerView包】 AndroidStudio添加v7包中的RecyclerView
关于AndroidStudio如何添加v7包中的RecyclerView? 左侧Project视图,在External Libraries下找到appcompat-v7包 右击appcompat-v7 ...
- AndroidStudio 添加翻译插件
添加方式 第一步 在AndroidStudio的菜单栏里找到 File > Settings > 点击 . 第二步 点击Plugins > 在点击Marketplace 等待插件列表 ...
- 简单的androidStudio 添加Jar包
感谢http://blog.csdn.net/ta893115871/article/details/46955791博主的文章, 1新建一个空项目 2在项目下添加一个新的moudle 3在该moud ...
- AndroidStudio 添加Selector文件,在res文件夹下添加文件夹
在res文件夹下添加文件夹: 添加Selector文件:
- AndroidStudio添加依赖库
以Gson为例 Step1:点击下图中的入口,进入ProjectStructure Step2: 在app项中选择Dependencies窗口,点击右侧的加号 Step3:在搜索框中输入gson,点击 ...
- AndroidStudio添加Android源码
找了半天没找到,还是用google好啊!修改如下,打开如下的build.gradle,修改compileSdkVersion 为你下载的源码版本号. Open your sdk manager fro ...
- Ubuntu下命令行安装jdk,android-studio,及genymotion虚拟机来进行android开发
安装JDK 从oracle官网下最新版的linux64位的jdk包(现在最新为jdk-8u92-linux-x64.tar.gz) 命令如下 新建文件夹-解压 sudo mkdir /usr/lib/ ...
- buntu下命令行安装jdk,android-studio,及genymotion虚拟机来进行android开发【转】
本文转载自:http://www.cnblogs.com/iamhenanese/p/5491862.html 安装JDK 从oracle官网下最新版的linux64位的jdk包(现在最新为jdk-8 ...
- 使用Android Annotations开发
使用Android Annotations框架gradle配置1.修改Module下的build.gradle apply plugin: 'com.android.application' appl ...
随机推荐
- 获得Windows系统的远程桌面连接历史记录
转载:http://www.mottoin.com/tech/109219.html 渗透技巧—获得Windows系统的远程桌面连接历史记录 0x00 前言 在渗透测试中,远程桌面连接的历史记录不可忽 ...
- CI 框架中的日志处理 以及 404异常处理
最近在整理项目中的日志问题,查了一些关于 “CI 框架中的日志处理 以及 404异常处理” 的东西,顺便记录一下: 关于错误日志: 1. 在CI框架中的 system/core/CodeIgniter ...
- journalctl 中文手册
版权声明 本文译者是一位开源理念的坚定支持者,所以本文虽然不是软件,但是遵照开源的精神发布. 无担保:本文译者不保证译文内容准确无误,亦不承担任何由于使用此文档所导致的损失. 自由使用:任何人都可以自 ...
- How to add more to Git Bash on Windows
How to add more to Git Bash on Windows Download the lastest wget binary for windows from https://ete ...
- [linux] uptime 命令中关于平均负载的解释
1.当前时间 00:13:25 2.系统已运行的时间 9小时19分 3.当前在线用户 2 user 4.平均负载:0.17, 0.12, 0.07 最近1分钟.5分钟.15分钟系统的负载 为了更好地理 ...
- zstu 4212 ——String Game ——————【字符串处理】
4212: String Game Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 337 Solved: 41 Description Alice a ...
- socket 客户端和服务端通信
客户端要连接服务器:首先要知道服务器的IP地址.而服务器里有很多的应用程序,每一个应用程序对应一个端口号 所以客户端想要与服务器中的某个应用程序进行通信就必须要知道那个应用程序的所在服务器的IP地址, ...
- Cookie的应用实例
ASP.NET设置元素CSS属性 1.添加一条CSS规则: control.style.add("CSS名称",“CSS值”); 2.添加Class规则 Control.CSSCl ...
- .Net下Redis使用注意事项
.Net下Redis使用注意事项 注:Redis的安装方法和桌面端工具很多,不在本文讨论范围内. 一:不结合适用场景的技术都是耍流氓,Redis主要适用场景: 简单字符串缓存 简单队列 简单发布订阅 ...
- main方法击破
什么是main方法? 是类中的一段代码,可以让程序独立运行. public class HelloWord{ public static void main(String[] args) { for ...