epoxy icon indicating copy to clipboard operation
epoxy copied to clipboard

I rebuild project with a @ModelView above my View in an library module, which causes kapt exception with no err message

Open metheway opened this issue 3 years ago • 3 comments

it works fine in an application module, while same code went kapt exception in an library module. epoxy:3.8.0 mavericks.2.2.0

metheway avatar Nov 17 '21 06:11 metheway

i tried @ModelView(autolayout, defaultlayout....) and even package-info.java to config, but none of them worked

metheway avatar Nov 17 '21 06:11 metheway

well , there are some exception info: 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) Execution failed for task ':ecp_admin_impl:kaptDebugKotlin'.

trace to the source code : val kotlinMetadata: KotlinClassMetadata? = viewElement.kotlinMetadata as? KotlinClassMetadata

if kotlinMetadata is null, then kotlinClassHeader must be null

two cases it would cause it null: KIND_FIELD_NAME == name && value is Int -> headerKind = KotlinClassHeader.Kind.getById(value)

METADATA_DATA_FIELD_NAME == name -> data = @Suppress("UNCHECKED_CAST") (value as List<String>).toTypedArray()

  1. headerKind == null :
  2. else if ((headerKind == CLASS || headerKind == FILE_FACADE || headerKind == MULTIFILE_CLASS_PART) && data == null) {}

i can't understand why it would be null

metheway avatar Nov 17 '21 07:11 metheway

epoxy:3.8.0

Any reason you are using a outdated version?

chrisjenx avatar Nov 19 '21 01:11 chrisjenx