[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
    • 분류 전체보기 (79)
      • Android (56)
        • ADB (4)
        • AddView (1)
        • Architecture (1)
        • Bluetooth (2)
        • BuildConfig (1)
        • Calendar (3)
        • Camera (2)
        • Cipher (1)
        • Compose (1)
        • ConstraintSet (1)
        • DataStore (1)
        • Dialog (1)
        • DrawerLayout (1)
        • Flow (1)
        • Glide (1)
        • MQTT (2)
        • Paging3 (4)
        • Permission (1)
        • SharedPreferences (3)
        • RecyclerView (5)
        • Room (1)
        • Splash (1)
        • TabLayout (2)
        • TextWatcher (1)
        • Update (1)
        • 이슈 처리 (13)
      • Android Studio (5)
      • Firebase (1)
      • Git (3)
      • 작업 일지 (13)
  • 최근 글

  • 인기 글

  • 태그

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

    • GitHub
  • 블로그 메뉴

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

티스토리툴바