Status Update
Comments
el...@google.com <el...@google.com> #2
There is no error when I use kotlin versions: 1.6.21, but issue/error starts appearing when kotlin version is 1.7.0
as...@gmail.com <as...@gmail.com> #3
yb...@google.com <yb...@google.com> #4
as...@gmail.com <as...@gmail.com> #5
as...@gmail.com <as...@gmail.com> #6
Thanks for the report I was able to reproduce the issue and indeed it occurs when using Kotlin 1.7.0. Sadly I don't have a workaround yet, but will investigate further.
yb...@google.com <yb...@google.com> #7
and just to clarify, we see the issue when using Room 2.4.2, but not with Room 2.5.0-alpha02.
el...@google.com <el...@google.com> #8
el...@google.com <el...@google.com> #9
I updated everything - It wasn't running.
With ext.kotlin_version = "1.6.21" - it is running.
as...@gmail.com <as...@gmail.com> #10
ap...@google.com <ap...@google.com> #11
Hey all, looks like the issue is related to a change in Kotlin's @Metadata
annotation and the way Room reads it, Room 2.4.2 is using an older version of the kotlinx-metadata-jvm
library which does not support reading Kotlin 1.7 information, where as in Room 2.5.0 we updated the library.
To workaround this issue please force upgrade the dependency by adding it to your annotation processor path, i.e. add kapt "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.5.0"
if you are using Room 2.4.x.
Meanwhile, I'll work on releasing a Room 2.4.3 that is compatible with Kotlin 1.7 since Room 2.5.x is still in development.
Description
Component used: Room
Version used: 2.4.0-alpha02
I just added foreign keys on a couple of entities and got this error when trying to use AutoMigration.
Here's the generated code:
Stack trace: