美文网首页
GreenDao使用步骤

GreenDao使用步骤

作者: Frank_Kivi | 来源:发表于2018-10-24 18:09 被阅读5次

    地址:https://github.com/greenrobot/greenDAO
    1.集成

    // In your root build.gradle file:
    buildscript {
        repositories {
            jcenter()
            mavenCentral() // add repository
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.1'
            classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin
        }
    }
     
    // In your app projects build.gradle file:
    apply plugin: 'com.android.application'
    apply plugin: 'org.greenrobot.greendao' // apply plugin
     
    dependencies {
        implementation 'org.greenrobot:greendao:3.2.2' // add library
    }
    
    1. modelling-entities 参考:http://greenrobot.org/greendao/documentation/modelling-entities/
    2. Build > Make Project 编译生成代码
    3. Core Initialization 参考:http://greenrobot.org/greendao/documentation/introduction/

    相关文章

      网友评论

          本文标题:GreenDao使用步骤

          本文链接:https://www.haomeiwen.com/subject/xrbxtqtx.html