Android Annotations 4.0.0 配置Rest API
来源:互联网 发布:知乎中国出口构成 编辑:程序博客网 时间:2024/05/23 14:20
AndroidAnnotations 从4.0.0开始模块化了,rest-api作为单独的模块发行。在下面的介绍中有增加一个android annotations模块的方法。
https://github.com/excilys/androidannotations/wiki/Building-Project-Gradle#adding-more-aa-plugins
下面我只说下我的配置:
在项目的build.gradle文件中添加依赖
apt "org.androidannotations:androidannotations:$AAVersion"compile "org.androidannotations:androidannotations-api:$AAVersion"apt "org.androidannotations:rest-spring:$AAVersion"compile "org.androidannotations:rest-spring-api:$AAVersion"provided 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
需要依赖Spring For Android。依赖的时候如果用compile,会提示重复引用了Jar包,不加的话,需要的类Android Studio都不提示。所以改成provided了。
需要注意的是,需要在项目的build.gradle和app的build.gralde里同时添加
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots'}
开始只在项目的build.gralde里添加的,一直编译不了。后来在app的build.gradle也加上就编译通过了。
1 0
- Android Annotations 4.0.0 配置Rest API
- Android Annotations 配置
- Android Studio 配置Annotations
- Android Studio配置Annotations
- Android Studio 配置 android annotations
- Android Annotations配置与使用
- android annotations Rest Get GsonHttpMessageConverter 获取服务端简单数据
- Android Studio1.5 配置Android annotations
- Android Studio中配置 Android annotations
- Android Studio 1.5+ 配置Android Annotations框架
- Android Annotations在Eclipse下配置
- Intellij IDEA配置Android Annotations注解框架
- Intellij IDEA配置Android Annotations注解框架
- Android Annotations在studio上的配置
- 使用Data Annotations和Fluent API配置数据库的映射
- Android Annotations
- Android Annotations
- Android annotations
- 如何移植μC/GUI在OLED12864上显示
- java数据写入数据库错误
- 基于c#环境的单片机和PC串口通信
- Linux spi驱动 (一)
- digester使用
- Android Annotations 4.0.0 配置Rest API
- [58] Length of Last Word
- UVa1601 万圣节后的早晨(The Morning after Halloween)
- 静态存储区的内存四区
- HDU 4528 (BFS)
- Oracle查询昨天的记录
- leetcode 357. Count Numbers with Unique Digits 解题报告
- codeforces round 359# div.2 B. Little Robber Girl's Zoo
- soapui笔记3:创建一个新的项目