Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dagger 2 annotation processor crash #49

Open
0ximDigital opened this issue Aug 19, 2015 · 1 comment
Open

Dagger 2 annotation processor crash #49

0ximDigital opened this issue Aug 19, 2015 · 1 comment

Comments

@0ximDigital
Copy link

Hi, project does not build after adding library via Gradle.

Stacktrace.. if it helps..

An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.IllegalArgumentException: expected one element but was: <android.support.v4.app.FragmentActivity, android.support.v4.app.TaskStackBuilder.SupportParentable>
    at com.google.common.collect.Iterators.getOnlyElement(Iterators.java:317)
    at com.google.common.collect.Iterators.getOnlyElement(Iterators.java:329)
    at com.google.common.collect.Iterables.getOnlyElement(Iterables.java:302)
    at dagger.shaded.auto.common.MoreTypes.nonObjectSuperclass(MoreTypes.java:722)
    at dagger.internal.codegen.MembersInjectionBinding$Factory.forInjectedType(MembersInjectionBinding.java:224)
    at dagger.internal.codegen.InjectBindingRegistry.getOrFindMembersInjectionBinding(InjectBindingRegistry.java:261)
    at dagger.internal.codegen.BindingGraph$Factory$RequestResolver.rollUpMembersInjectionBindings(BindingGraph.java:374)
    at dagger.internal.codegen.BindingGraph$Factory$RequestResolver.rollUpMembersInjectionBindings(BindingGraph.java:378)
    at dagger.internal.codegen.BindingGraph$Factory$RequestResolver.rollUpMembersInjectionBindings(BindingGraph.java:378)
    at dagger.internal.codegen.BindingGraph$Factory$RequestResolver.rollUpMembersInjectionBindings(BindingGraph.java:378)
    at dagger.internal.codegen.BindingGraph$Factory$RequestResolver.lookUpBindings(BindingGraph.java:366)
    at dagger.internal.codegen.BindingGraph$Factory$RequestResolver.resolve(BindingGraph.java:461)
    at dagger.internal.codegen.BindingGraph$Factory.create(BindingGraph.java:228)
    at dagger.internal.codegen.BindingGraph$Factory.create(BindingGraph.java:151)
    at dagger.internal.codegen.ComponentProcessingStep.process(ComponentProcessingStep.java:76)
    at dagger.shaded.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:228)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
etc..

Note : Did not try to inject anything. i've just add gradle dependency and proguard rules.

Best regards

@quangson91
Copy link

@0ximDigital You maybe check: https://stackoverflow.com/questions/35424372/dagger-2-inject-error-in-appcompatactivity/35424973#35424973

problem: maybe you added dagger in both library & app module.
Hope this help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants