반응형
error: To use Coroutine features, you must add `ktx` artifact from Room as a dependency. androidx.room:room-ktx:<version>
Room 라이브러리를 사용하고 있었고, Dao에서 suspend를 추가하였는데 해당 에러가 발생했다.
Dao를 선언할 때 suspend 키워드를 붙이면 Room에서 suspend 함수로 구현을 해주는데
해당 기능을 해주는 라이브러리가 없어서 발생한 에러인 것 같다.
implementation "androidx.room:room-ktx:2.4.3"
gradle에 추가하면서 문제를 해결됐다.
반응형
'Android > 이슈 처리' 카테고리의 다른 글
| [Android] :app:hiltJavaCompileDebug (0) | 2023.03.16 |
|---|---|
| [Android] Permission denied (publickey). (0) | 2023.03.08 |
| [Android] Duplicate class androidx.lifecycle ··· (0) | 2023.01.09 |
| [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 |