AndroidStudio配置AndroidAnnotations
2016-01-08 01:08
381 查看
android配置AndroidAnnotations可以分为2步
第一步->build.gradle(project)
// Top-level build file where you can add configuration options common to alsub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files //配置Android annotations classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
第二步–>build.gradle(app)
apply plugin: 'com.android.application' //配置Android annotations apply plugin: 'android-apt' def AAVersion = '3.3.2' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "cc.ostea.hiandr" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } //配置Android annotations apt { arguments { androidManifestFile variant.outputs[0]?.processResources?.manifestFile // if you have multiple outputs (when using splits), you may want to have other index than 0 // you should set your package name here if you are using different application IDs resourcePackageName "cc.ostea.hiandr" // You can set optional annotation processing options here, like these commented options: logLevel 'INFO' logFile '/var/log/aa.log' } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:design:23.1.1' //配置Android annotations apt "org.androidannotations:androidannotations:$AAVersion" compile "org.androidannotations:androidannotations-api:$AAVersion" }
相关文章推荐
- OS X 上利用 Homebrew 安装 Android SDK
- Android开发-无法新建Activity及新建后编译错误
- How to see output from Android test
- Android Handle
- 蜂窝教育Android培训 以真实商业项目塑造技术人才
- Android Design Support Library(1)- FloatingActionButton的使用
- Android ContentObserver监听 系统声音变化- -
- Android 打包apk
- Android必知必会--GreenDao缓存
- android之旅25 内容提供者与内容观察者
- Android必知必会--GreenDao缓存
- 解决Android中单个dex文件中方法数越界的问题
- Android IPC机制之开启多进程模式
- 学习Android用到的资源(ing)
- Android打空的签名包
- Android Studio——handle是发出消息后就自动接收消息的吗?
- android 中style和Theme
- 深入理解Android消息处理系统——Looper、Handler、Thread
- 安卓android.os.Looper.java分析
- Android Tools update proxy