Epoxy: Epoxy processor crashes when using Kotlin 1.4-M1

Created on 2 May 2020  路  3Comments  路  Source: airbnb/epoxy

I haven't debugged why yet.

error: Epoxy Processor Exception:  Caused by KotlinNullPointerException: null
Stacktrace:  com.airbnb.epoxy.ModelViewInfo.findMatchingSetter(ModelViewInfo.kt:292)       
    com.airbnb.epoxy.ModelViewInfo.addProp(ModelViewInfo.kt:192)
    com.airbnb.epoxy.ModelViewProcessor.processSetterAnnotations(ModelViewProcessor.kt:171)       
    com.airbnb.epoxy.ModelViewProcessor.process(ModelViewProcessor.kt:46)       
    com.airbnb.epoxy.EpoxyProcessor.processRound(EpoxyProcessor.java:193)
    com.airbnb.epoxy.EpoxyProcessor.process(EpoxyProcessor.java:165)

Most helpful comment

actually, i think I've got this

All 3 comments

thanks, I'll look into this

We use the library https://github.com/Takhion/kotlin-metadata in the annotation processor to determine whether a setter function (in a view class with @ModelView) has a default value in kotlin.

That library hasn't been updated since kotlin 1.2.x and seems abandoned, and it seems to be what is throwing the NPE. The error seems internal to the library, likely because of an incompatibility in the metadata format, so there doesn't seem to be a quick fix.

I think the correct fix will be to migrate to instead using the kotlinx-metadata-jvm library. If anyone wants to help with that it would be appreciated

actually, i think I've got this

Was this page helpful?
0 / 5 - 0 ratings