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

Examples don't compile #87

Closed
imbeyondboredom opened this issue Dec 2, 2014 · 8 comments
Closed

Examples don't compile #87

imbeyondboredom opened this issue Dec 2, 2014 · 8 comments
Assignees

Comments

@imbeyondboredom
Copy link

I know you guys are still in the process of making the examples, but at this point they don't work at all. One such example is that https://github.com/google/dagger/blob/master/examples/android-activity-graphs/src/main/java/com/example/dagger/activitygraphs/AbstractActivityComponent.java has a different class name than the file.

This makes determining how everything is supposed to work fairly difficult if you don't already understand the intricacies of the Dagger2 implementation.

@gk5885
Copy link

gk5885 commented Dec 2, 2014

I totally agree. @cgruber did the conversion. Christian, can you take a look here?

@cgruber
Copy link

cgruber commented Dec 6, 2014

Thats confusing to me as they compiled when I ran them, but I'll confirm
and fix.

On Tue, Dec 2, 2014, 09:30 Gregory Kick notifications@github.com wrote:

Assigned #87 #87 to @cgruber
https://github.com/cgruber.


Reply to this email directly or view it on GitHub
#87 (comment).

@nguyentruongtho
Copy link

With default profile, they will compile but with android profile, it will not because of the error reported above, see https://github.com/google/dagger/blob/master/examples/pom.xml#L32-L49. android-activity-graphs is not compilable.

@liminal
Copy link

liminal commented Dec 19, 2014

How could the version of the sample code in github master possibly compile?
Look at for instance https://github.com/google/dagger/blob/master/examples/android-activity-graphs/src/main/java/com/example/dagger/activitygraphs/ui/HomeActivity.java#L26
where the refrenced field is never declared.

@nguyentruongtho
Copy link

@liminal It is not hard to fix this compilation issue, I think the maintainers are busy. Meanwhile, you can checkout my fix here #93.

@mgrzechocinski
Copy link

You can also checkout my sample project https://github.com/mgrzechocinski/dagger2-example

@EverybodyKurts
Copy link

Yes, I ran into this problem as well! This is my first taste of Dagger and while I know Dagger 2 hasn't been officially released yet, I was scratching my head as to what I was possibly doing wrong. @nguyentruongtho, @mgrzechocinski I'll take a look at your sample projects and see if I can get further.

@cgruber
Copy link

cgruber commented Apr 7, 2015

Largely addressed in #93 and #145

@cgruber cgruber closed this as completed Apr 7, 2015
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

7 participants