• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >数据库其它 > Android 数据库 GreenDao

Android 数据库 GreenDao

作者:yijiaodingqiankun的博客 字体:[增加 减小] 来源:互联网 时间:2017-08-07

yijiaodingqiankun的博客通过本文主要向大家介绍了android,数据库等相关知识,希望本文的分享对您有所帮助

一、  GreenDao怎么用

配置

1.  要在project对应项目的build.gradle里面配置依赖包

dependencies {//依赖包
   
classpath 'com.android.tools.build:gradle:2.2.3'
  
 
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.0'

 

2.  要在新建的module模块对应的build.gradle里面配置依赖包以及生成类的位置

dependencies {
   
compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile(
'com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude
group: 'com.android.support', module: 'support-annotations'
   
})
    compile
'com.android.support:appcompat-v7:25.0.1'
   
testCompile 'junit:junit:4.12'
   
compile 'org.greenrobot:greendao:3.2.0'

 

 

 

在顶部声明部位

 

 

apply plugin: 'com.android.application'

apply plugin: 'org.greenrobot.greendao'


 

在android{}添加

android {
   
compileSdkVersion 25
    buildToolsVersion
"23.0.3"

    greendao{
        schemaVersion 1
        daoPackage
'com.jiyun.com.day07_greendao'
       
targetGenDir 'src/main/java'
   
}

配置好之后,点Sync now 就会自动下载greenDAO对应的jar包

 

注意:红色字体是要配置的,还有记得改包名

 

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 详解SQLite中的数据类型
  • 详解SQLite中的查询规划器
  • Android 数据库 GreenDao

相关文章

  • 2017-05-11SQL语句详细说明[部分]
  • 2017-05-11sql语句中where和having的区别
  • 2017-05-1150条SQL查询技巧、查询语句示例
  • 2017-05-11Access转SqlServer的注意事项
  • 2017-05-11Mssql,Access的sql经典SQL语句大全
  • 2017-05-11利用reverse索引优化like语句的方法详解
  • 2017-05-11access mysql mssql 随机 10条数据的sql语句 原创
  • 2017-05-11数据库设计的完整性约束表现在哪些方面
  • 2017-05-11交叉表查询sql语句
  • 2017-05-11数据库设计规范化的五个要求 推荐收藏

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • Sql Server、Access数据排名的实现方法(例如:成绩排名)
    • SQL Prompt--绝好的SQL语法提示工具
    • 如何解决VisualSVN Server 安装提示错误 Repositories is not a valid short file name
    • 在telnet下操作memcache详解(操作命令详解)
    • datastage server job之dsjob 命令
    • 深入HQL学习以及HQL和SQL的区别
    • 简单分析SQLite4的一些设计改变
    • 虚拟主机ACCESS转换成MSSQL完全攻略(图文教程)
    • Hadoop2.X/YARN环境搭建--CentOS7.0 JDK配置
    • access mysql mssql 随机 10条数据的sql语句 原创

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有