[Android] warning: Schema export directory is not provided ···

2023. 4. 7. 17:16·Android/이슈 처리
반응형

warning: Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide `room.schemaLocation` annotation processor argument OR set exportSchema to false.

 

위 경고 메시지는 Room 라이브러리를 사용해서 데이터베이스 스키마를 생성할 때 exportSchema 설정에 의해 위의 경고가 뜬다.

 

exportSchema는 Boolean 타입으로 데이터베이스 스키마를 폴더로 내보낼지 정할 수 있다.

default 값이 true로 되어있는데 폴더 경로를 정해줘야 한다.

경로를 정해주지 않으면 위의 경고가 발생하며, 경로를 설정하는 방법은 다음과 같다.

build.gradle(App)에서 defaultConfig 하위 섹션에 스키마 경로를 작성하면 된다.

android {
    ...
    
    defaultConfig {
        javaCompileOptions {
            annotationProcessorOptions {
                arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
            }
        }
    }
}

 

경로를 설정하고 싶지 않다면 옵션을 false로 두는 것으로 경고 문구를 피할 수 있다.

반응형

'Android > 이슈 처리' 카테고리의 다른 글

[Android] Warning: SDK processing. This version only ···  (0) 2025.07.04
[Android] Execution failed for task ':app:checkDebugDuplicateClasses' ···  (0) 2023.05.11
[Android] Deprecated Gradle features were used in ···  (0) 2023.04.05
[Android] Failed to instantiate test runner class ···  (0) 2023.03.22
[Android] An instance of PagingSource was re-used ···  (0) 2023.03.17
'Android/이슈 처리' 카테고리의 다른 글
  • [Android] Warning: SDK processing. This version only ···
  • [Android] Execution failed for task ':app:checkDebugDuplicateClasses' ···
  • [Android] Deprecated Gradle features were used in ···
  • [Android] Failed to instantiate test runner class ···
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)
  • 최근 글

  • 인기 글

  • 태그

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

    • GitHub
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • hELLO· Designed By정상우.v4.10.4
O_Gyong
[Android] warning: Schema export directory is not provided ···
상단으로

티스토리툴바