question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error generating model classes Caused by IllegalArgumentException: modifiers [protected, abstract] must contain one of [public, private]

See original GitHub issue

Build failed with :

e: error: Epoxy Processor Exception: Error generating model classes Caused by IllegalArgumentException: modifiers [protected, abstract] must contain one of [public, private]       Stacktrace:   
  com.airbnb.epoxy.ModelBuilderInterfaceWriter.writeInterface(ModelBuilderInterfaceWriter.kt:57)
  com.airbnb.epoxy.GeneratedModelWriter.generateClassForModel(GeneratedModelWriter.kt:174)
  com.airbnb.epoxy.GeneratedModelWriter.generateClassForModel$default(GeneratedModelWriter.kt:134)
  com.airbnb.epoxy.ModelProcessor.writeModel(ModelProcessor.kt:85)    
  com.airbnb.epoxy.ModelProcessor.processModels(ModelProcessor.kt:69)     
  com.airbnb.epoxy.EpoxyProcessor.processRound(EpoxyProcessor.java:187) 
  com.airbnb.epoxy.EpoxyProcessor.process(EpoxyProcessor.java:165)

> Task :lib:kaptDebugKotlin FAILED

Creating this issue to add more information in the error message.

I am still not sure what is the cause, the change we made was to move some epoxy code from app module to a library module.

epoxyVersion = '3.3.0' gradle_android_version = '3.2.1'

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
toshanmugarajcommented, Sep 2, 2021

ah, that’ll do it.

yes, I can try to include model information for where the exception happens. thanks for posting the context!

How to add model information to trace this error, I am now facing same error but no clue of the issue.

1reaction
eboudrantcommented, Mar 12, 2019

I will try to find the models, the error was not verbose enough to give the culprit (and we have a lot). It happen with no change except move the models from a app module to a lib module. May be a kapt flag missing in our new lib module…

Read more comments on GitHub >

github_iconTop Results From Across the Web

EpoxyModels are not working in feature modules/library ...
1 Answer 1 ... There is a problem with using that annotation on library project. ... No, if the layout is in the...
Read more >
Chapter 8. Classes - Oracle Help Center
Class Modifiers. A class declaration may include class modifiers. ClassModifier: (one of) Annotation public protected private abstract static final strictfp.
Read more >
OOP Inheritance & Polymorphism - Java Programming Tutorial
A class called Author is designed as shown in the class diagram. It contains: Three private member variables: name ( String ), email...
Read more >
checkstyle – Class Design
The check finds classes that have overridable methods (public or protected methods that are non-static, not-final, non-abstract) and have ...
Read more >
JML Reference Manual - Department of Computer Science
name, and the fact that the class is both public and abstract. ... the extra JML modifiers, one should think of this field,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found