[Android] Duplicate class androidx.lifecycle ···

2023. 1. 9. 16:56·Android/이슈 처리
반응형
// 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
'Android/이슈 처리' 카테고리의 다른 글
  • [Android] Permission denied (publickey).
  • [Android] error: To use Coroutine features, you must ···
  • [Android] Could not find method kapt() for arguments ···
  • [Android] Could not resolve all files for configuration ':app:debugCompileClasspath'.
O_Gyong
O_Gyong
안드로이드 기술 정리
  • O_Gyong
    O_Gyong's TECH
    O_Gyong
    • 분류 전체보기 (81)
      • Android (58)
        • ADB (4)
        • Architecture (1)
        • Data (5)
        • Firebase (2)
        • Network & Connecting (4)
        • Security & Privacy (3)
        • UI (24)
        • 기타 (3)
        • 이슈 처리 (14)
      • Android Studio (5)
      • Git (3)
      • 작업 일지 (13)
  • 최근 글

  • 인기 글

  • 태그

    firebase
    issue
    해상도
    webview
    CalendarView
    Kotlin
    compose
    Bluetooth
    Andoird
    hilt
    BLE
    CameraX
    github
    Android Studio
    Android
    Pagination
    flow
    MQTT
    ADB
    TabLayout
    Room
    in-app update
    kizitonwose
    Paging3
    Navigation
    GIT
    paging
    SharedPreferences
    recyclerview
    loading
  • 링크

    • GitHub
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • hELLO· Designed By정상우.v4.10.4
O_Gyong
[Android] Duplicate class androidx.lifecycle ···
상단으로

티스토리툴바