3

I've just updated Android Studio from 1.5 to 2.2.1 and same for Gradle. I have a project which uses an annotation processor framework (made by me) to do Dagger like Dependency Injection.

This used to work just fine before the update, but now Gradle is not able to resolve the generated classes (although they are generated and the Android Studio editor links them correctly) and thus I'm not able to build the project.

I've tried to Google and found lots of similar problems but none solved mine.

Can anyone tell me if this is a known bug or if something had changed? Thank you very much.

EDIT

Here's a screenshot:

enter image description here

As you can see, the error is the class co.aurasphere.revolver.Revolver not found, but you can see the class on the left (under build/generated/source/apt/debug) and the editor is linking it correctly (if I over on it pressing CTRL the link points to the generated class).

The precise error I get is "error: cannot find symbol".

Aurasphere
  • 3,841
  • 12
  • 44
  • 71
  • 1
    Look at this post about using apt with the new gradle plugin: http://www.littlerobots.nl/blog/Whats-next-for-android-apt/ – Mateusz Jablonski Oct 11 '16 at 19:36
  • Thank you for the help! I've followed the tutorial and migrated from apt to annotationProcessor but I have still the same problem. It's very strange because I see my generated classes in app/build/generated/source/apt/debug/ the same folder used by the android databinding library and I don't seem to get any error for that... – Aurasphere Oct 11 '16 at 20:04
  • 1
    If the classes are there, it's not an annotation processor problem. You probably need to post more info like the exact error you get when running the build from the command line. – botteaap Oct 12 '16 at 07:23
  • @botteaap I've added a screenshot. The warning you see on the build output is mine and not relevant to the problem. Thank you! – Aurasphere Oct 12 '16 at 10:43
  • 1
    Can't really tell from the screenshot but looks like the generated code is referencing itself? – botteaap Oct 12 '16 at 15:24
  • @botteaap No, the screenshot class is referencing the generated code. The symbol that is not found is the import in the screenshot (in another class) – Aurasphere Oct 12 '16 at 15:29
  • 2
    do you find the solution? i'm facing the same problem using DBFlow. – Diego Fernando Murillo Valenci Feb 03 '17 at 22:46
  • @DiegoFernandoMurilloValenci not yet! If you find a solution could you please share it? Thank you! – Aurasphere Feb 03 '17 at 23:34

0 Answers0