安卓注解框架 annotation
2016-07-18 13:53
441 查看
为了提升开发效率,个人习惯,彰显NB等因素 zb成本最低的框架—annotation
特点:简单 文档齐全
菜鸟都可以上手—开发工作的入门门槛越来越低了
gradle配置
以上是在 全局的gradle中配置的
以下是 modle gradle中配置的
作为参考,自己仔细研究的时候再认真看,现在知道大概是怎么回事
详细参考
配置好了 环境就号多了
所有支持的注解
语法在此,也没什么好说的现在
其次 慕课网上 有个 讲解安卓框架的 提高安卓开发效率的 课程 大家可以搜一下
特点:简单 文档齐全
菜鸟都可以上手—开发工作的入门门槛越来越低了
gradle配置
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { mavenLocal() jcenter() maven { url 'http://maven.oschina.net/content/groups/public/' } } dependencies { classpath 'com.android.tools.build:gradle:2.1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' } } allprojects { repositories { mavenLocal() jcenter() maven { url 'http://maven.oschina.net/content/groups/public/' } } }
以上是在 全局的gradle中配置的
以下是 modle gradle中配置的
apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt' def AAVersion = '3.3.2' // change this to your desired version, for example the latest stable: 4.0.0 android { compileSdkVersion 23 buildToolsVersion "24.0.0" defaultConfig { applicationId "com.example.administrator.annotationtest" minSdkVersion 17 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.3.0' compile 'com.android.support:support-v4:23.3.0' apt "org.androidannotations:androidannotations:$AAVersion" compile "org.androidannotations:androidannotations-api:$AAVersion" } apt { arguments { androidManifestFile variant.outputs[0]?.processResources.manifestFile //这句话sometimes cant find manifestFile, //// so add resourcePackageName can solve this problem resourcePackageName "com.example.administrator.annotationtest" } }
作为参考,自己仔细研究的时候再认真看,现在知道大概是怎么回事
详细参考
配置好了 环境就号多了
所有支持的注解
语法在此,也没什么好说的现在
其次 慕课网上 有个 讲解安卓框架的 提高安卓开发效率的 课程 大家可以搜一下
相关文章推荐
- 使用C++实现JNI接口需要注意的事项
- Android IPC进程间通讯机制
- Android Manifest 用法
- [转载]Activity中ConfigChanges属性的用法
- Android之获取手机上的图片和视频缩略图thumbnails
- Android之使用Http协议实现文件上传功能
- Android学习笔记(二九):嵌入浏览器
- android string.xml文件中的整型和string型代替
- i-jetty环境搭配与编译
- android之定时器AlarmManager
- android wifi 无线调试
- Android Native 绘图方法
- Android java 与 javascript互访(相互调用)的方法例子
- android 代码实现控件之间的间距
- android FragmentPagerAdapter的“标准”配置
- Android"解决"onTouch和onClick的冲突问题
- android:installLocation简析
- android searchView的关闭事件
- SourceProvider.getJniDirectories