I try to use Room in Android Studio 3.0 with kotlin. I have successfully created 3 entities that work well (database is created, i can insert rows and so on). Now, i want to add some functionnalities but i have this enigmatic error:
Warning:warning: Supported source version 'RELEASE_7' from annotation processor 'android.arch.persistence.room.RoomProcessor' less than -source '1.8'
Error:Execution failed for task ':app:kaptDebugKotlin'.
> Internal compiler error. See log for more details
Do you know how can I see "log for more details". Is there another way to point excatly where the error is ?
For the moment, I can find where the error is only by commenting one-by-one the portion of new codes i've added, until the compilation success.
By setting --stacktrace --debug for compiler option, the message is even more enigmatic:
Error:org.jetbrains.kotlin.kapt3.diagnostic.KaptError: Error while annotation processing
[Edit] It's not a duplicate : the linked question in Emmanuel S comment is a runtime exception. In my case, it's a compile time problem. And, I can correct the bug but the question I ask is about the lack of information about where is excactly the problem.
[Edit 2] I give some precision to my question by using an example. Imagine this code:
@Dao
PersonDao {
@Query("SELECT * FROM categoryes")
fun getAll() : List<Categ>
...
}
A compile error is fired but I understand why : it's because i've made a type in categoryes. But the error message give no idea where the problem is. After correcting the typo, all is good.
So, is there a way to know where the problem is exactly ? I think it's nothing to do with annotationProcessor or kapt in build.gradle
[Edit 3] Problem has been solved with Kotlin plugin update (from 1.1.51 to version new version 1.1.60)
Now i've a clear error message:
Error:(9, 1) error: There is a problem with the query: [SQLITE_ERROR] SQL error or missing database (no such table: categs)
So, was it really a duplicate ???