// Room 의존성 추가
implementation "androidx.room:room-runtime:2.4.3"
kapt "androidx.room:room-compiler:2.4.3"
// paging
implementation "androidx.paging:paging-runtime-ktx:3.1.1"
Room과 Paging3을 사용하기 위해 gradle 파일에 의존성을 추가하고 실행을 했는데,
Duplicate class androidx.lifecycle.ViewModelLazy found in modules lifecycle-viewmodel-2.5.1- runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.1) and lifecycle-viewmodel-ktx-2.2.0-runtime (androidx.lifecycle :lifecycle-viewmodel-ktx:2.2.0)
위와 같은 에러가 발생했다.
paging 라이브러리를 제거하면 앱이 실행되는 것으로 보아 네이밍이 겹치는 클래스가 있어서 인 것 같다.
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
에러 문구에 나온 라이브러리를 등록하면 앱이 정상적으로 실행된다.
'Android > 이슈 처리' 카테고리의 다른 글
[Android] Permission denied (publickey). (0) | 2023.03.08 |
---|---|
[Android] error: To use Coroutine features, you must ··· (0) | 2023.01.26 |
[Android] Could not find method kapt() for arguments ··· (0) | 2023.01.06 |
[Android] Could not resolve all files for configuration ':app:debugCompileClasspath'. (0) | 2022.12.26 |
[Android] Unsupported Modules Detected (0) | 2022.11.21 |
댓글