코틀린으로 연동시 주의 할 점


1. Data class 설정시 꼭 val -> var 로 하자. 

2. app build gradle 설정시 윗부분에 apply plugin: 'kotlin-kapt' 을 넣어주자

3. Database 에 export = true 또는 

build.gradle 하단에 

============================================

configurations.all {

    resolutionStrategy.eachDependency { DependencyResolveDetails details ->

        def requested = details.requested

        if (requested.group == 'com.android.support') {

            if (!requested.name.startsWith("multidex")) {

                details.useVersion '26.0.2'

            }

        }

    }

}

==============================================

을 넣어서 오류를 없애자. 


4. 컴파일시 오류발생시

================================

// build.gradle defaultConfig 안에 넣어주자. 

javaCompileOptions {

            annotationProcessorOptions {

                arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]

            }

        }

==========================



코틀린 + 룸 연동 (초급)

https://medium.com/@tonyowen/a-room-with-a-view-getting-started-ec010f9f5448


룸연동시 커스텀 시간 타입 설정

https://medium.com/@chrisbanes/room-time-2b4cf9672b98


룸 엔터티 설명

https://medium.com/@tonyowen/room-entity-annotations-379150e1ca82


room DB 외부로 추출시 

https://medium.com/@sreekumar_av/how-to-export-backup-room-db-and-view-all-the-tables-using-sqlite-viewer-9b053d44690f


7 단계별로 알아보는 룸

https://medium.com/google-developers/7-steps-to-room-27a5fe5f99b2


버전업 올릴때 설명(중요함)!!

https://medium.com/google-developers/understanding-migrations-with-room-f01e04b07929




+ Recent posts