@Generated not found
See original GitHub issueHi, I think it’s a problem with my environment (java 1.7.0_51, 64 bit, mac os 10.10), but I’m using Android Studio and tried to setup a simple android sample application with dagger 2 as dependency injection framework.
My compiler can not resolve the @Generated
annotation in class path (import javax.annotation.Generated;
) which is used in all dagger generated classes.
My gradle build file looks like this:
compile 'com.google.dagger:dagger:2.0-SNAPSHOT'
provided 'com.google.dagger:dagger-compiler:2.0-SNAPSHOT'
Any idea what could be wrong?
Do I have to add the javax annotation dependency to my build.gradle
?
Issue Analytics
- State:
- Created 9 years ago
- Comments:12
Top Results From Across the Web
@Generated not found *javax.annotation.processing ... - GitHub
I am seeing this issue when trying to compile an Android project with Dagger2 (Google I/O 2018 sample app). package javax.annotation.processing ...
Read more >IntelliJ error: cannot find symbol @javax.annotation.Generated
I found this symbol error a few times but no resolution that helped. I tried invalidating caches and restarting a few times.
Read more >error: cannot find symbol @javax.annotation.Generated
I expected the test case to run easily since I did not change anything from the git clone. What happens instead? error: cannot...
Read more >Room appears to use the wrong Generated annotation when ...
My application started to fail during compilation. I get the error that the @Generated Annotation can not be found because the package javax.annotation...
Read more >Generated (Java Platform SE 8 ) - Oracle Help Center
The Generated annotation is used to mark source code that has been generated. It can also be used to differentiate user written code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop 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
Top GitHub Comments
@sockeqwe: just fast fix but did you tried to add this:
Probably this happened because the system JDK_HOME is more upgraded then the JDK that comes with Android Studio