Anvil doesn't merge the interface: Component is not abstract and does not override abstract method
See original GitHub issueHi there,
I am running into this issue. Anvil merges modules but when i contribute an interface to scope, it results in this error:
DaggerComponent is not abstract and does not override abstract method exampleMethod() in ExampleInterface
Example code:
abstract class AnvilAppScope private constructor()
@ContributesTo(AnvilAppScope::class)
interface ExampleInterface {
fun exampleMethod(): ExampleClass
}
@AppScope
@MergeComponent(
scope = AnvilAppScope::class,
modules = [AndroidInjectionModule::class],
dependencies = [Component1::class, Component2::class]
)
interface AppComponent {
@Component.Builder
interface Builder { ... }
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:9
Top Results From Across the Web
Class is not abstract and does not override abstract method
The error I am receiving when I compile is: MyTestApp.Rectangle is not abstract and does not override abstract method drawEllipse(java.awt.
Read more >is not abstract and does not override abstract method
I think this has something to do with the line containing the getSelectedItem() method.
Read more >square/anvil: A Kotlin compiler plugin to make ... - GitHub
Anvil is a Kotlin compiler plugin to make dependency injection with Dagger easier by automatically merging Dagger modules and component interfaces.
Read more >How do we fix the " is not abstract and does not override ...
This is an error message that points out that your method has a return type of String while the method you are trying...
Read more >I keep getting an error: java: GUI is not abstract and does not ...
Your class implements an interface but does not override the interface method. You have a typo in your actionPerformed method name.
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

No, the first example in the README shows that. This code snippet is very specific to your sample.
great it works. thank you @vRallev. do you think it’s worth adding this example to README?
(AppComponent.builder().build() as ComponentInterface).injectActivity(this)