sockeqwe / mosby

A Model-View-Presenter / Model-View-Intent library for modern Android apps
http://hannesdorfmann.com/mosby/
Apache License 2.0
5.49k stars 841 forks source link

Unable to build different modules #238

Closed gaurav-mishra8 closed 7 years ago

gaurav-mishra8 commented 7 years ago

Sorry it might seem a basic mistake , but i am unable to build modules other than sample app.

While building sample-mail or sample-mvi I get error in the generated files:

Error:(18, 53) error: cannot find symbol class DetailsFragmentBuilder Error:(20, 51) error: cannot find symbol class MailsFragmentBuilder

Error:(42, 70) error: cannot find symbol class MailsAdapterBinder /home/gaurav/AndroidStudioProjects/mosby/sample-mail/src/main/java/com/hannesdorfmann/mosby3/sample/mail/mails/MailsAdapter.java

Kindly suggest

sockeqwe commented 7 years ago

Those files are generated with annotation processing and should generated whenever you press the green play button. Alternatively, you can run it manually with Menu Build -> Rebuild

Have you changed something in the source code?because if you have an compile error the. Annotation processing doesn't run and you get a lot of errors like Cannot find symbol MailsFragmentBuilder, but the real problem is another compiler error that maybe you have overlooked in the error messages (could be somewhere mixed somewhere in between MailsFragmentBuilder error messages)

Anyway, our CI server is able to build this project without any problems. https://travis-ci.org/sockeqwe/mosby

Gaurav Mishra notifications@github.com schrieb am Mo., 17. Apr. 2017, 07:23:

Sorry it might seem a basic mistake , but i am unable to build modules other than sample app.

While building sample-mail or sample-mvi I get error in the generated files:

Error:(18, 53) error: cannot find symbol class DetailsFragmentBuilder Error:(20, 51) error: cannot find symbol class MailsFragmentBuilder

Error:(42, 70) error: cannot find symbol class MailsAdapterBinder

/home/gaurav/AndroidStudioProjects/mosby/sample-mail/src/main/java/com/hannesdorfmann/mosby3/sample/mail/mails/MailsAdapter.java

Kindly suggest

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sockeqwe/mosby/issues/238, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnrjFFrEI4dTZIpfC5IIb1iWrcZaeYks5rwvdsgaJpZM4M-4ao .

gaurav-mishra8 commented 7 years ago

Well the error was in building module sample-mail only. Below is the stack trace

`Caused by: java.lang.NoSuchFieldError: MAP at dagger.internal.codegen.ProvidesMethodValidator.validate(ProvidesMethodValidator.java:115) at dagger.internal.codegen.ModuleProcessingStep.process(ModuleProcessingStep.java:79) 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) at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176) at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856) at com.sun.tools.javac.main.Main.compile(Main.java:523) ... 103 more


`
Seems like some dagger2 issue.
Got it fixed by updating Dagger2 version to latest : 2.10 .Not quite sure about the reason for this error.
Thanks it is fixed now . You can close this issue
erikdewit87 commented 7 years ago

I encountered this as well. Got stuck for a while because my mind processed the stacktrace as the same and I stopped reading.. Just happens that the most valuable info is stated in the code block right after the stacktace:

Seems like some dagger2 issue. Got it fixed by updating Dagger2 version to latest : 2.10 .Not quite sure about the reason for this error.