* What went wrong:
Execution failed for task ':app:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> java.lang.reflect.InvocationTargetException (no error message)
According to stack trace:
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
Had the same problem but it was solved when I changed the “build.gradle” file from buildscript.ext.kotlin_version=“1.4.21” to “1.3.21”, which is what is in the data package for the book.
I had the same problem, and all I did was remove the word suspend with LiveData function… apparently they are not supported.
@Query("DELETE FROM daily_sleep_quality_table")
suspend fun clear()
@Query("SELECT * FROM daily_sleep_quality_table ORDER BY nightId DESC")
fun getAllNights(): LiveData<List<SleepNight>>
@Query("SELECT * FROM daily_sleep_quality_table ORDER BY nightId DESC LIMIT 1")
suspend fun getTonight(): SleepNight?