error: cannot find symbol @Generated( ^
See original GitHub issueBuilding via Android Studio works fine, but if I call
./gradlew build
I get
error: cannot find symbol
@Generated(
^
all over the place. I’m using the latest version of dagger. My android project is set to Java 8 source. Calling java --version
in my terminal tells me I have java 9 (which I’m not sure how, but I that’s besides the point). Any ideas what I should be doing? I’ve seen a bunch of mixed answers on stackoverflow, but adding a dependency feels weird. My system being on java 9 doesn’t make sense to me because I though Android Studio bundles it’s own version of the JDK.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:23
- Comments:32
Top Results From Across the Web
IntelliJ error: cannot find symbol @javax.annotation.Generated
I have cloned a github project into IntelliJ that uses gradle. I import and first thing it says is that gradle is not...
Read more >BUILD FAILURE - cannot find symbol (symbol: class ... - GitHub
When executing "mvn appengine:deploy" I'm getting the following error: [ERROR] COMPILATION ERROR :
Read more >error: cannot find symbol @javax.annotation.Generated
What steps will reproduce the issue? Running test case on project cloned directly from Github; Simple project using this class. What is the...
Read more >How to Resolve The Cannot Find Symbol Error in Java - Rollbar
When the Java compiler encounters a use of an identifier which it cannot find in the symbol table, it raises the cannot find...
Read more >The "Cannot find symbol" Compilation Error - Baeldung
The “cannot find symbol” error comes up mainly when we try to use a variable that's not defined or declared in our program....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
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
I managed to work around this on a JDK 11 install by adding the following to the bottom of my affected modules’ build.gradle files. I imagine it would work in a
subprojects.afterEvaluate
block in the top-level build.gradle too.In Kotlin 1.3.70 it’s fixed