Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dagger 2 : Cannot resolve symbol for dagger component

I would like to exercise this Dagger 2 Vehicle Motor example.

I made everything exact like in that tutorial, except for my gradel.build:

compile 'com.google.dagger:dagger:2.4'
apt 'com.google.dagger:dagger-compiler:2.4'
compile 'javax.annotation:javax.annotation-api:1.2'

but then I get an

error: cannot find symbol variable Dagger_VehicleComponent

Whats wrong there? (Same without '_' underscore)

like image 477
Ralf Wickum Avatar asked May 30 '16 14:05

Ralf Wickum


1 Answers

Another version solved it:

compile 'com.google.dagger:dagger:2.2'
apt 'com.google.dagger:dagger-compiler:2.2'
provided 'javax.annotation:jsr250-api:1.0'
like image 130
Ralf Wickum Avatar answered Sep 27 '22 18:09

Ralf Wickum