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

Error:(16, 20) error: cannot find symbol class AutoValueMoshi_JsonAdapterFactory #54

Closed
spectrl opened this issue Oct 2, 2016 · 3 comments

Comments

@spectrl
Copy link

spectrl commented Oct 2, 2016

Trying to compile a pure java module and I have added
compileOnly 'com.ryanharter.auto.value:auto-value-moshi:0.4.0'
to my gradle file but it seems like my factory class isn't being generated...

This is the static method for my JsonAdapterFactory class:
public static JsonAdapter.Factory create() { return new AutoValueMoshi_JsonAdapterFactory(); }

@spectrl spectrl changed the title Error:(16, 20) error: cannot find symbol class AutoValueMoshi_JsonAdapterFactory Error:(16, 20) error: cannot find symbol class AutoValueMoshi_JsonAdapterFactory using compileOnly Oct 2, 2016
@spectrl spectrl changed the title Error:(16, 20) error: cannot find symbol class AutoValueMoshi_JsonAdapterFactory using compileOnly Error:(16, 20) error: cannot find symbol class AutoValueMoshi_JsonAdapterFactory Oct 2, 2016
@spectrl
Copy link
Author

spectrl commented Oct 2, 2016

Just tested using provided in my Android module as well and still can't get it to work.
Am I missing something obvious?

@spectrl
Copy link
Author

spectrl commented Oct 2, 2016

Ignore me. I didn't have any static JsonAdapter methods in my model classes.
Could maybe make that clearer in the ReadMe?
It makes sense now, but the wording kinda suggests that the @MoshiAdapterFactory annotated abstract class can be used instead of the individual JsonAdapter methods in each model class - which are obviously also required in order for the factory to actually be generated.

@spectrl spectrl closed this as completed Oct 2, 2016
@rharter
Copy link
Owner

rharter commented Oct 2, 2016

Yeah, we get this issue a lot, so we should update the readme. I'm open to
suggestions if you want to submit a PR, otherwise I'll look at it
tomorrow.

On Sun, Oct 2, 2016, 11:29 AM Kavi Dhokia notifications@github.com wrote:

Closed #54 #54.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#54 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPJblVYUBOFzYRlSZCX1p7m76Qc83dbks5qv9v7gaJpZM4KMC1k
.

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

2 participants