How to import Room Persistence Library to an Android project

后端 未结 13 1191
执笔经年
执笔经年 2021-02-05 00:01

I recently saw the new feature announced on Google I/O Room Persistence Library to work with Sqlite databases on Android. I have been looking to the official documentation and I

13条回答
  •  梦谈多话
    2021-02-05 00:21

        * Add these in project level gradle
    
        allprojects {
            repositories {
                jcenter()
                maven { url 'https://maven.google.com' }
            }
        }
    
    
        ext {
            buildToolsVersion = "25.0.2"
            supportLibVersion = "25.3.1"
            archRoomVersion = "1.0.0-alpha1"
        }
    
    
        * Add these in module level gradle dependencies
    
    dependencies {
    
         compile 'android.arch.persistence.room:runtime:' + rootProject.archRoomVersion;
            annotationProcessor 'android.arch.persistence.room:compiler:' + rootProject.archRoomVersion;
    
    }
    

提交回复
热议问题