Kotlin Epoxy Processor Exception
See original GitHub issueHi, this is driving me crazy. I can’t seem to build my app because I get the following exception:
e: error: Epoxy Processor Exception: EpoxyAttribute annotations must not be on private fields without proper getter and setter methods. (class: HomeQuickLinksModel, field: quickLinks)
Here is the model class:
@EpoxyModelClass(layout = R.layout.quick_links_expanded_layout)
abstract class HomeQuickLinksModel :
EpoxyModelWithHolder<HomeQuickLinksModel.Holder>() {
class Holder : EpoxyHolder() {
var recyclerView: RecyclerView? = null
var itemView: View? = null
override fun bindView(itemView: View) {
recyclerView = itemView.quick_links_recycler_view
this.itemView = itemView
}
}
@EpoxyAttribute var quickLinks: List<QuickLink> = listOf()
...
From what I understand, Kotlin should be generating the getters and setters for the quickLinks field. I verified this by trying to call them from java code. But the processor still doesn’t like it! I am using epoxy version 2.10.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Epoxy processor crashes when using Kotlin 1.4-M1 · Issue #956
I haven't debugged why yet. error: Epoxy Processor Exception: Caused by KotlinNullPointerException: null Stacktrace: com.airbnb.epoxy.
Read more >Epoxy, Kotlin: Using @ModelView generates nothing with no ...
Epoxy, Kotlin: Using @ModelView generates nothing with no errors ... Epoxy Processor Exception: Unable to get layout resource for view ...
Read more >Epoxy — A proxy for Adapter and complex view types! - Medium
TL;DR I will be running through on how AirbnbEng's Epoxy library helped me to bypass the need for adapters, view-holder classes, and the...
Read more >How to use Epoxy in Android (Part 1) - Iqbal Ahmed
Here we need a helper class KotlinModel that we can get from epoxy sample or from our source code. abstract class KotlinModel( @LayoutRes ......
Read more >[Solved]-Why Epoxy does not generate model class?-kotlin
One common mistake when using Epoxy in Kotlin is mixing annotation processing engines. If you copied this from Epoxy's readme:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for digging into this. The annotation processor should be able to handle wild cards. I’ll try to get around to it soon, but thanks for posting the workaround in the meantime.
Fixed with https://github.com/airbnb/epoxy/pull/451