개발 환경 설정/데이터베이스(DB)
(30초 읽기) 초간단! Room DB 시작하기 🖥️
안드하는잡스
2025. 2. 14. 14:51
안드로이드에서 Room DB를 쓰려면? 🏗️ 그냥 Gradle에 추가하면 끝!
dependencies {
// Room 런타임 라이브러리 🏠
implementation "androidx.room:room-runtime:2.6.1"
// 코루틴 확장 ✨
implementation "androidx.room:room-ktx:2.6.1"
// Annotation Processing 🛠️
implementation "androidx.room:room-compiler:2.6.1"
// 선택: 테스트 라이브러리 🧪
testImplementation "androidx.room:room-testing:2.6.1"
}
✅ 이제 데이터베이스 준비 완료! 다음 단계? Entity, DAO, Database 클래스 만들러 가자! 🚀